/* ========== DESIGN MODERNO ELEZIONI CAMPANIA ========== */

/* Font moderno */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f7fa 100%);
    min-height: 100vh;
}

/* custom.css */
.titolo {
    /*	font-family: Titillium Web, HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; */
    font-family: Titillium WebBold;
    font-size: 2em;
    left: 120px;
}

.sottotitolo {
    /*	font-family: Titillium Web, HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; */
    font-family: Titillium Web;
    font-size: 1.2em;
}
/*.menu{
	font-family: Titillium WebBold;
	font-size:16px!important;
}*/

@font-face {
    font-family: Titillium WebBold;
    src: url(c1c9a0e9.ttf);
}

@font-face {
    font-family: Titillium Web;
    src: url(a97cdcb3.ttf);
}




#intestazione:empty,
#grafici:empty,
#dvrisultati:empty,
#divD:empty,
#divSezioni:empty {
    display: none;
}


/* ========== HEADER MODERNO CON COLORI REGIONALI ========== */
.intestazionemb {
    height: 70px;
    background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.3);
}

.intestazione {
    height: 110px;
    background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.3);
}

#headerpage {
    background: linear-gradient(135deg, #0066cc 0%, #004c99 100%) !important;
}

#headerpage .titolo,
#headerpage .sottotitolo {
    color: white;
}

#headerpage .titolo {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#headerpage .sottotitolo {
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

#headerpage img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

#headerpage img:hover {
    transform: scale(1.05);
}

/* ========== MENU MODERNO - SFONDO OPACO ========== */
#menu {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    border-top: 2px solid #0066cc;
}

#menu > div:first-child {
    background: linear-gradient(135deg, #1173d4 0%, #0066cc 100%) !important;
    padding: 0 !important;
}

#menu a.w3-bar-item {
    position: relative;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 0;
    padding: 14px 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#menu a.w3-bar-item:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: translateY(-2px);
}

#menu a.w3-bar-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#menu a.w3-bar-item:hover::after {
    width: 80%;
}

/* ========== BREADCRUMB MODERNO ========== */
#breadcrumb {
    background: linear-gradient(to right, #f0f8ff, #ffffff);
    border-top: 2px solid #0066cc !important;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 20px !important;
}

#breadcrumb button {
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#breadcrumb button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#breadcrumb .w3-light-gray {
    background-color: #0066cc !important;
    color: white !important;
}

#breadcrumb .w3-blue {
    background: linear-gradient(135deg, #2196F3 0%, #0066cc 100%) !important;
    border: none !important;
}

/* ========== CONTENUTO PRINCIPALE ========== */
#maincontent {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 30px !important;
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px;
}

#maincontent h2 {
    color: #0066cc;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0066cc;
    position: relative;
}

#maincontent h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #2196F3;
}

#maincontent > * {
    animation: fadeIn 0.5s ease-out;
}

/* ========== PANNELLI INFORMATIVI ========== */
.w3-pale-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-left: 4px solid #0066cc !important;
    border-radius: 8px;
    padding: 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ========== PULSANTI MODERNI ========== */
.w3-button {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.w3-button.w3-small {
    padding: 6px 12px !important;
    font-size: 12px !important;
    white-space: nowrap;
}

.w3-blue {
    background: linear-gradient(135deg, #2196F3 0%, #0066cc 100%) !important;
    border: none !important;
}

.w3-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4) !important;
}

.w3-red {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
}

.w3-button.w3-white.w3-border-blue:hover {
    background-color: #0066cc !important;
    color: white !important;
    border-color: #0066cc !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.2);
}

/* ========== TABELLE MODERNE E PULITE ========== */
.w3-table-all {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    background: white;
    width: 100%;
}

.w3-table-all th {
    background: linear-gradient(135deg, #2196F3 0%, #0066cc 100%) !important;
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    padding: 16px !important;
    border-bottom: 3px solid #0066cc;
}

.w3-table-all thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.w3-table-all td {
    padding: 14px !important;
    border-bottom: 1px solid #f0f4f8;
    transition: all 0.2s ease;
    background: white;
}

.w3-table-all tbody tr {
    position: relative;
    transition: all 0.2s ease;
}

.w3-table-all tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #2196F3 0%, #0066cc 100%);
    transition: width 0.2s ease;
}

.w3-table-all tbody tr:hover {
    background: linear-gradient(90deg, #f0f8ff 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    transform: translateX(4px);
}

.w3-table-all tbody tr:hover::before {
    width: 4px;
}

.w3-table-all a {
    color: #0066cc;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.w3-table-all a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2196F3, #0066cc);
    transition: width 0.2s ease;
}

.w3-table-all a:hover {
    color: #004c99;
}

.w3-table-all a:hover::after {
    width: 100%;
}

.w3-table-all tr.w3-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
}

.w3-table-all tr.w3-blue td {
    font-weight: 600;
    color: #0066cc;
    border-bottom: 2px solid #2196F3;
    background: transparent;
}

.w3-table-all img {
    transition: all 0.2s ease;
    filter: grayscale(20%);
}

.w3-table-all tr:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.w3-table-all td[style*="text-align:right"] {
    font-weight: 500;
    color: #0066cc;
}

/* ========== CONTAINER RISULTATI ========== */
#dvrisultati,
#divD,
#divSezioni {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#dvrisultati table,
#divD table,
#divSezioni table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e3f2fd;
}

/* ========== DATATABLE MODERNO ========== */
.dataTables_wrapper {
    border-radius: 12px;
    overflow: hidden;
}

.dataTables_filter input {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

.dataTables_filter input:focus {
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1) !important;
    outline: none !important;
}

.dt-buttons .dt-button {
    background: linear-gradient(135deg, #2196F3 0%, #0066cc 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    margin: 0 4px !important;
    transition: all 0.2s ease !important;
}

.dt-buttons .dt-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4) !important;
}

/* ========== GRAFICI ========== */
#grafici {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}

#canvas {
    max-height: 450px !important;
}

/* ========== FOOTER MODERNO ========== */
.footer {
    background: linear-gradient(135deg, #00264d 0%, #001a33 100%) !important;
    color: #00ffff !important;
    border-top: 4px solid #0066cc;
}

/* ========== WARNING BOX ========== */
#warning {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6e6 100%);
    border-left: 4px solid #ffa726;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-size: 14px;
    line-height: 1.7;
}

/* ========== LOGHI LISTE ========== */
img[src*="loghi/"] {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

img[src*="loghi/"]:hover {
    transform: scale(1.05);
}

/* ========== SELECT DROPDOWN MODERNO ========== */
select.w3-btn {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: white !important;
    color: #495057 !important;
}

select.w3-btn:focus {
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1) !important;
    outline: none !important;
}

/* ========== SCROLL BAR PERSONALIZZATA ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2196F3 0%, #0066cc 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0066cc;
}

/* ========== ANIMAZIONI ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 767px) {
    #headerpage .w3-display-topleft {
        left: 10px !important;
        top: 5px !important;
    }
    
    #headerpage .w3-display-topleft img {
        width: 60px !important;
        height: 60px !important;
    }
    
    #headerpage .titolo {
        left: 80px !important;
        top: 15px !important;
        font-size: 16px !important;
    }
    
    #headerpage .sottotitolo {
        left: 80px !important;
        bottom: 8px !important;
        font-size: 12px !important;
    }

    #menu {
        top: 50px !important;
    }
    
    #menu a.w3-bar-item {
        font-size: 12px;
        padding: 12px 14px;
    }
    
    #maincontent {
        padding: 15px 5px !important;
        width: 100% !important;
        border-radius: 0 !important;
        margin-top: 100px !important;
    }
    
    #maincontent.center {
        width: 100% !important;
        padding: 15px 5px !important;
        border: none !important;
        margin: 0 !important;
    }
    
    #maincontent h2 {
        font-size: 22px;
    }
    
    #dvrisultati,
    #divD,
    #divSezioni {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #dvrisultati table,
    #divD table,
    #divSezioni table {
        display: table;
        table-layout: auto;
    }
    
    .w3-table-all th,
    .w3-table-all td {
        font-size: 11px !important;
        padding: 6px 3px !important;
    }
    
    .w3-table-all tbody tr:hover {
        transform: translateX(2px);
    }
    
    #dvrisultati img[src*="loghi"],
    #divD img[src*="loghi"],
    #divSezioni img[src*="loghi"] {
        max-width: 35px !important;
        max-height: 35px !important;
    }
    
    #dvrisultati td:first-child,
    #divD td:first-child {
        width: 45px !important;
        padding: 4px 2px !important;
    }
}









/* ========== RESPONSIVE DESKTOP ========== */
@media (min-width: 768px) {
    #menu {
        top: 110px !important;
    }
    
    #maincontent {
        margin-top: 230px !important;
        width: 90%;
    }
    
    .center {
        width: 85% !important;
    }
}