html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjY2LjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI23LjM4NyA4OS43OTIxIDI2Ny4zODcgODcuMzAwNSAyNjYuMTE2IDg2LjA1NDcgMjYzLjU3NiA4Ni4wNTQ3WiIgZmlsbD0iI0ZGRTUwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9nPjwvc3ZnPg==) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.log-panel {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 400px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    padding: 10px;
    z-index: 1000;
    font-family: monospace;
    font-size: 12px;
}

.log-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

    .log-list li {
        padding: 2px 0;
        border-bottom: 1px solid #eee;
    }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====================== */
/* VAN GRID SYSTEM */
/* ====================== */
.vans-container {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    max-height: 60vh;
    overflow-y: auto;
}

.van-summary {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 10px 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.badge-count {
    background: #1b6ec2;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 10px;
}

/* LOADING INDICATOR */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #1b6ec2;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* NO RESULTS MESSAGE */
.no-results {
    color: #666;
    font-style: italic;
    padding: 10px;
    display: inline-block;
}

/* VAN CONTAINER TRANSITION */
.vans-container {
    transition: opacity 0.3s ease;
}

    .vans-container.hidden {
        opacity: 0;
        height: 0;
        overflow: hidden;
    }

/* CONTENITORE PRINCIPALE */
.filtro-container {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* GRIGLIA ORIZZONTALE */
.container-categorie {
    display: flex !important;
    flex-direction: row;
    gap: 25px;
    padding: 15px;
    overflow-x: auto;
    background: #f8f9fa;
}

/* SINGOLA CATEGORIA */
.categoria {
    flex: 0 0 300px;
    min-width: 300px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

    /* CATEGORIA ATTIVA */
    .categoria.categoria-attiva {
        border-color: #2196F3;
        box-shadow: 0 4px 8px rgba(33, 150, 243, 0.15);
    }

/* INTESTAZIONE CATEGORIA */
.intestazione-categoria {
    padding: 12px;
    background: #f1f3f5;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 15px;
    cursor: pointer;
}

/* CAMPI FILTRO */
.campi-filtro {
    display: grid;
    gap: 12px;
}

/* STILE PULSANTI */
.pulsanti-azione {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.pulsante {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.invio {
    background-color: #4caf50;
    color: white;
}

.reset {
    background-color: #f44336;
    color: white;
}

/* Overlay styles */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.overlay-content {
    position: absolute;
    right: 0;
    width: 95%;
    max-width: 420px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Overlay Header */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e1e4e8;
    background: #f6f8fa;
}

.overlay-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #24292e;
}

.overlay-body {
    height: calc(100% - 61px);
    overflow-y: auto;
    padding: 1rem;
}

.overlay-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .overlay-content {
        width: 60%;
    }
}

@media (max-width: 767px) {
    .overlay-content {
        width: 85%;
    }

    .overlay-body {
        padding: 0.2rem;
    }
}

.overlay-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.overlay-footer button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

    .overlay-footer button:first-child {
        background-color: #4CAF50;
        color: white;
        border: none;
    }

    .overlay-footer button:last-child {
        background: none;
        border: 1px solid #ccc;
    }

.header-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.btn-reset, .btn-submit, .btn-close {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-reset {
    background-color: #ffebee;
    color: #d32f2f;
}

.btn-submit {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Icone compatte */
.fas {
    font-size: 1rem;
}

.filtro-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    gap: 1rem;
}

.filtro-title {
    margin: 0;
    font-size: 1.25rem;
    flex-grow: 1;
}

.filtro-actions {
    display: flex;
    gap: 0.75rem;
}

/* Pulsanti compatti */
.pulsante {
    padding: 0.4rem 0.8rem;
    min-width: auto;
}

/* Intestazione categoria compatta */
.intestazione-categoria {
    padding: 0.5rem 1rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #f1f3f5;
    margin: 0.25rem 0;
}

    .intestazione-categoria h4 {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 600;
    }

.btn-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    background: #ffffff;
    color: #24292e;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-icon-text:hover {
        background: #f3f4f6;
        border-color: #c9cdd2;
    }

    .btn-icon-text .icon {
        font-size: 0.9rem;
    }

    .btn-icon-text .text {
        font-size: 0.75rem;
    }

.btn-close {
    background: none;
    border: none;
    color: #6a737d;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.35rem;
    margin-left: 0.25rem;
}

    .btn-close:hover {
        color: #24292e;
    }

@media (max-width: 768px) {
    .btn-icon-text .text {
        display: none;
    }

    .btn-icon-text {
        padding: 0.35rem;
    }
}

/* TOOLTIP SPECIALE PER OVERLAY */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: max-content;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 0.35rem 0.7rem;
    position: fixed;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.15s ease;
    font-size: 0.75rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transform: translateX(-50%);
    left: 50%;
    bottom: auto;
    top: calc(100% + 5px);
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* PULSANTI COMPATTI CON ICONE */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

    .btn-icon:hover {
        background-color: #f0f0f0;
    }

.btn-close {
    color: #6c757d;
}

    .btn-close:hover {
        color: #ff4444;
    }

/* POSIZIONAMENTO OVERLAY ACTIONS */
.overlay-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    position: relative;
}

.overlay-content {
    overflow: visible;
    z-index: 1000;
}

.overlay-header {
    position: relative;
    z-index: 1001;
}

/* ======================================================= */
/* MAIN LAYOUT - STILE CNP CON COLORI LAZIO (SIMPLIFICATO) */
/* ======================================================= */

/* Variabili colore Lazio */
:root {
    --lazio-celeste-dark: #0066A4;
    --lazio-celeste: #6699CC;
    --lazio-celeste-light: #8BB9E1;
    --lazio-celeste-very-light: #E6F2FF;
    --lazio-white: #FFFFFF;
    --lazio-gold: #D4AF37;
    --lazio-navy: #1A2B56;
    --lazio-gray-light: #F8F9FA;
    --lazio-gray: #E9ECEF;
    --lazio-gray-dark: #6C757D;
}

/* Reset e base */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER SEMPLICE - Solo con pulsanti Clienti/Staff/Chat */
.main-header {
    background: linear-gradient(135deg, var(--lazio-celeste-dark) 0%, var(--lazio-celeste) 100%);
    color: white;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    min-width: max-content;
    /* Rimuovi gap se c'era */
}

.header-logo {
    height: 50px; /* Aumenta se necessario */
    width: auto;
}


/* Header Actions - SOLO Clienti, Staff, Chat */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

    .header-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        text-decoration: none;
        color: white;
    }

.chat-toggle-btn {
    background: linear-gradient(135deg, var(--lazio-gold) 0%, #FFD700 100%);
    color: var(--lazio-navy);
}

.chat-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--lazio-gold);
    border-radius: 50%;
    border: 2px solid var(--lazio-celeste-dark);
}

.btn-text {
    font-size: 0.9rem;
}

/* MAIN CONTENT - Senza sidebar */
.main-content {
    margin-top: 0;
    padding: 20px;
    min-height: calc(100vh - 60px);
    background-color: var(--lazio-gray-light);
    overflow-y: auto;
    flex-grow: 1;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .btn-text {
        display: none;
    }

    .header-btn {
        padding: 8px;
    }
}

/* Colori Lazio per i componenti Bootstrap */
.text-lazio-blue {
    color: var(--lazio-celeste-dark) !important;
}

.bg-lazio-blue {
    background-color: var(--lazio-celeste-dark) !important;
}

.btn-lazio-blue {
    background-color: var(--lazio-celeste-dark) !important;
    border-color: var(--lazio-celeste-dark) !important;
    color: white !important;
}

.btn-outline-lazio-blue {
    color: var(--lazio-celeste-dark) !important;
    border-color: var(--lazio-celeste-dark) !important;
}

    .btn-outline-lazio-blue:hover {
        background-color: var(--lazio-celeste-dark) !important;
        color: white !important;
    }

.bg-lazio-light {
    background-color: var(--lazio-celeste-very-light) !important;
}


/* ======================================================= */
/* HEADER UNIFICATO VANGEST                               */
/* ======================================================= */

/* HEADER LAYOUT */
.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    height: 100%;
    padding: 0 20px;
    max-width: 100%;
}

/* Logo e titolo (sinistra) */
.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: max-content;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.header-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-left: 10px;
}

/* Pulsanti centrali */
.header-center-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.header-center-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    min-width: 140px;
    justify-content: center;
}

    .header-center-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

/* Pulsante chat (destra) */
.header-right-actions {
    display: flex;
    align-items: center;
    min-width: max-content;
}

.header-chat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--lazio-gold) 0%, #FFD700 100%);
    border: none;
    color: var(--lazio-navy);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    min-width: 120px;
    justify-content: center;
}

    .header-chat-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    }

/* MODALE LOGIN */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    animation: fadeIn 0.2s ease;
}

.login-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.login-modal-header {
    background: linear-gradient(135deg, var(--lazio-celeste-dark) 0%, var(--lazio-celeste) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .login-modal-header h5 {
        margin: 0;
        font-weight: 600;
    }

.login-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    .login-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.login-modal-body {
    padding: 30px;
}

.login-form .form-control {
    padding: 10px 15px;
    border: 1px solid var(--lazio-gray);
    border-radius: 6px;
    font-size: 0.95rem;
}

    .login-form .form-control:focus {
        border-color: var(--lazio-celeste);
        box-shadow: 0 0 0 3px rgba(102, 153, 204, 0.1);
    }

/* Responsive */
@media (max-width: 992px) {
    .header-content {
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 10px 15px;
    }

    .header-brand {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .header-center-actions {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        justify-content: center;
        margin-top: 5px;
    }

    .header-right-actions {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        justify-self: end;
    }

    .header-center-btn, .header-chat-btn {
        padding: 8px 15px;
        min-width: 120px;
        font-size: 0.9rem;
    }

    .btn-text {
        display: inline;
    }
}

@media (max-width: 768px) {
    .header-subtitle {
        display: none;
    }

    .header-center-btn, .header-chat-btn {
        min-width: 100px;
        padding: 8px 12px;
    }

    .btn-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .header-center-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .header-center-btn, .header-chat-btn {
        width: 100%;
        max-width: 200px;
    }

    .btn-text {
        display: inline;
    }
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* ======================================================= */
/* HERO SECTION - STILE CNP CON IMMAGINE DI SFONDO        */
/* ======================================================= */

.hero-section {
    position: relative;
    background: url('/images/VanImage.jpg') no-repeat center center;
    background-size: cover;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: white;
    margin-top: -20px; /* Compensa padding del main content */
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Overlay scuro per leggibilità */
    display: flex;
    align-items: center;
}

.min-vh-70 {
    min-height: 70vh;
}

.hero-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-lead {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: white;
    color: var(--lazio-celeste-dark);
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

    .btn-hero-primary:hover {
        background: var(--lazio-celeste-very-light);
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        color: var(--lazio-celeste-dark);
    }

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

    .btn-hero-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-3px);
        color: white;
    }

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        margin-left: -15px;
        margin-right: -15px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        text-align: center;
        padding: 12px 25px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-icon {
        font-size: 2rem;
    }

    .hero-lead {
        font-size: 1rem;
    }
}






/* CORREZIONE LARGHEZZA HOMEPAGE */
.hero-section,
.services-section,
.chat-banner,
.access-section,
.use-cases {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
    left: 0;
    right: 0;
}

    /* Contenitori interni mantengono il normale comportamento */
    .hero-section .container,
    .services-section .container,
    .chat-banner .container,
    .access-section .container,
    .use-cases .container {
        width: 100% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 15px;
        padding-right: 15px;
    }

/* Override per evitare effetti sul modale */
.login-overlay .login-container,
.login-panel,
.login-panel .container {
    width: auto !important;
    max-width: 400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}