﻿/* v2 */
/* Mobile First Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ffc107;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --success-color: #28a745;
}

body {
    font-size: 14px;
    background-color: #f5f6fa;
}

.container {
    padding-left: 10px;
    padding-right: 10px;
}

/* Logo responsive */
.Logo {
    height: 28px;
}

.Titolo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Navbar mobile optimized */
.navbar {
    padding: 0.5rem 0.75rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

/* Cards per mobile */
.rSindaco, .rPartito, .rConsigliere {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .rPartito .flex-grow-1 {
        min-width: 0;
    }

    .rPartito > div:last-child {
        flex-shrink: 0;
    }

    .rSindaco:hover, .rPartito:hover, .rConsigliere:hover {
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    }

.table-borderless td {
    border: none;
}

.table-borderless tr {
    border-bottom: 1px solid #e9ecef;
}

.rSindaco {
    padding: 0;
}

    .rSindaco > .col {
        min-width: 0;
    }

    .rSindaco > .col-auto:last-child {
        flex-shrink: 0;
    }

.BoxSindacoFoto {
    flex-shrink: 0 !important;
    width: auto !important;
    height: 100% !important;
    min-height: 70px !important;
    margin: 0 !important;
    padding: 0 !important;
}

    .BoxSindacoFoto img {
        width: auto !important;
        height: 100% !important;
        min-height: 70px !important;
        object-fit: cover !important;
        border-radius: 10px 0 0 10px !important;
        border: none !important;
        box-shadow: none !important;
        display: block !important;
        margin: 0 !important;
    }



.NomeSindaco {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 2px 0 !important;
    text-align: left !important;
    padding: 0 !important;
}

.VotiSindaco {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.flex-grow-1 {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 8px 5px 6px;
    min-width: 0;
}

.NomeSindaco {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1px 0 !important;
    text-align: left !important;
    padding: 0 !important;
    line-height: 1.2;
}

.VotiSindaco {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.2;
}

.PercentualeVotiSindaco {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--success-color);
    white-space: nowrap;
    margin-left: 10px;
    padding-right: 8px;
    margin-right: 5px;
}

.min-width-0 {
    min-width: 0;
}

.FotoSindaco {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.VotiSindaco {
    font-size: 0.85rem;
    color: var(--text-light);
}

    .VotiSindaco span.VotiSindaco {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-dark);
    }

.PercentualeVotiSindaco {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--success-color);
    white-space: nowrap;
    margin-left: 10px;
    margin-right: 5px;
}

/* Table responsive */
.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    font-size: 0.85rem;
}

    .table th, .table td {
        padding: 6px 8px;
        white-space: nowrap;
    }

/* Dropdown menu mobile */
.dropdown-menu {
    max-height: 60vh;
    overflow-y: auto;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 10px;
}

.dropdown-item {
    padding: 10px 16px;
}

    .dropdown-item:active {
        background-color: var(--primary-color);
    }

/* Nav links mobile */
.nav-link {
    padding: 8px 12px;
    font-size: 0.95rem;
}

/* Mobile piccolo - Partiti */
@media (max-width: 400px) {
    .BoxSindacoFoto {
        width: 50px !important;
        min-width: 50px !important;
    }

        .BoxSindacoFoto img {
            min-height: 50px !important;
        }
}

/* Layout partiti sotto 767px */
@media (max-width: 767px) {
    .BoxSindaco {
        flex-wrap: wrap;
    }

    .BoxSindacoFoto {
        order: 1;
    }

    .BoxSindaco > .flex-grow-1 {
        order: 2;
        width: calc(100% - 70px);
    }

    .BoxSindaco > .flex-shrink-0 {
        order: 3;
        margin-left: auto;
    }

    .NomeSindaco {
        margin-left: 10px;
        font-size: 1.1rem;
    }

    .VotiSindaco {
        margin-left: 10px;
        font-size: 0.9rem;
    }

    .PercentualeVotiSindaco {
        font-size: 1.5rem;
        padding: 4px 12px;
        margin-right: 5px;
    }
}

/* Footer */
footer {
    font-size: 0.85rem;
    padding: 15px;
}

/* Media Queries for larger screens */
@media (min-width: 576px) {
    body {
        font-size: 15px;
    }

    .Logo {
        height: 30px;
    }

    .logo-glow {
        transition: all 0.3s ease;
    }

        .logo-glow:hover {
            filter: drop-shadow(0 0 15px rgba(255, 193, 7, 0.8)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
        }

    .Titolo {
        font-size: 1.25rem;
    }

    .BoxSindacoFoto {
        width: 60px;
        height: 60px;
    }

    .NomeSindaco {
        font-size: 1.2rem;
    }

    .VotiSindaco span.VotiSindaco {
        font-size: 1.3rem;
    }

    .PercentualeVotiSindaco {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .Logo {
        height: 45px;
    }

    .Titolo {
        font-size: 1.5rem;
    }
    /*
    .rSindaco, .rPartito, .rConsigliere {
        margin-bottom: 15px;
        padding: 15px;
    }
    */
    .BoxSindacoFoto {
        width: 80px;
        height: 80px;
    }

    .NomeSindaco {
        font-size: 1.4rem;
    }
}

@media (min-width: 992px) {
    .BoxSindacoFoto {
        width: 100px;
        height: 100px;
        margin-right: 15px;
    }

    .NomeSindaco {
        font-size: 1.6rem;
    }
}

.Titolo {
    font-size: 1.5rem;
}

.BoxSindacoFoto {
}

.BoxSindaco {
    display: flex;
    width: 100%;
    background-color: #f8f9fa;
    margin: 5px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .BoxSindaco::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 0;
    }

    .BoxSindaco:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        background-color: #fff;
    }


.NomeSindaco {
    font-size: 1.4rem;
    display: block;
    color: #2c3e50;
    font-weight: 700;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-shadow: none;
    letter-spacing: 0.5px;
    margin-left: 15px;
}

.BoxSindacoFoto {
    flex-shrink: 0;
    padding-right: 15px;
}

.SindacoVincente {
    transform: scale(1.1);
    background: radial-gradient(circle, rgba(45,253,79,1) 0%, rgba(255,255,255,1) 80%);
}

    .SindacoVincente img {
    }

.SindacoPerdente {
    transform: scale(0.9);
}

.NomePartito {
    font-size: 1.3rem;
    display: block;
    color: #67aef6;
    font-weight: 600;
    font-family: 'Arial Rounded MT', Arial;
    text-shadow: none;
}

.PercentualeVotiSindaco {
    font-size: 2.2rem;
    font-weight: 800;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    margin-right: 10px;
}

.VotiSindaco {
    color: #6c757d;
    font-weight: 500;
    font-size: 1.2rem;
}

    .VotiSindaco span.VotiSindaco {
        font-size: 1.5rem;
        font-weight: 700;
        color: #2c3e50;
    }

.VotoConsigliere {
    font-weight: bold;
    font-size: 1.2rem;
    color: #495057;
}

.PercentualeVotoConsigliere {
    font-weight: bold;
    font-size: 1.2rem;
    color: #28a745;
}

.FotoSindaco {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.BoxSindaco:hover {
    cursor: pointer;
}

.FotoConsigliere {
    max-height: 120px;
    max-width: 120px;
}

.ContenitoreSindaco {
    border: 4px solid #cbcbcb;
    padding: 15px;
    border-radius: 25px;
    /*min-width: 150px;*/
}

    .ContenitoreSindaco:hover {
        background-color: white;
        opacity: 0.7;
        cursor: pointer;
    }



th:first-child, td:first-child {
    position: sticky;
    left: 0px;
    background-color: white;
}

.tabsticky {
    position: sticky;
    left: 0px;
    background-color: white;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px; /* Vertically center the text there */
}

.banner {
    height: 80px;
    margin-bottom: 10px;
    margin-top: 5px;
}


/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {

    .BoxSindacoFoto {
        width: 64px;
    }

    .NomeSindaco {
        font-size: 1.5rem;
        text-shadow: 2px 2px #808080;
        font-weight: 400;
    }

    .NomePartito {
        font-size: 1.5rem;
        text-shadow: 1px 1px #808080;
        font-weight: 400;
    }

    .banner {
        height: 100px;
    }
}

.BoxSindacoFoto {
    width: 80px;
}



/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {

    .BoxSindacoFoto {
        width: 96px;
    }

    .Logo {
        height: 50px;
    }

    .banner {
        height: 120px;
    }
}

/* Large devices (desktops, 992px and up)*/
@media (min-width: 992px) {
    .BoxSindacoFoto {
        width: 100px;
    }

    .NomeSindaco {
        font-size: 2rem;
    }

    .NomePartito {
        font-size: 1.9rem;
    }

    .banner {
        height: 150px;
        margin-top: 10px;
        margin-bottom: 15px;
    }
}

/* Extra large devices (large desktops, 1200px and up)*/
@media (min-width: 1200px) {
    .banner {
        height: 150px;
        margin-top: 10px;
        margin-bottom: 15px;
    }
}

.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

    .table thead th {
        background: #f8f9fa;
        color: #495057;
        font-weight: 600;
        border: none;
        border-bottom: 2px solid #dee2e6;
        padding: 10px;
    }

    .table tbody tr {
        transition: all 0.2s ease;
    }

        .table tbody tr:hover {
            background-color: #f8f9fa;
            transform: scale(1.001);
        }

.table-bordered {
    border: 1px solid #dee2e6;
}

    .table-bordered th,
    .table-bordered td {
        border: 1px solid #dee2e6;
    }

#BoxListaSindaci {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    #BoxListaSindaci .row {
        margin-bottom: 0;
    }

.rSindaco, .rPartito, .rConsigliere {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

    .rSindaco:hover, .rPartito:hover, .rConsigliere:hover {
        background: #f8f9fa;
        transform: none;
    }

.BoxSindacoFoto {
    flex-shrink: 0 !important;
    width: 90px !important;
    height: 90px !important;
    min-height: 90px !important;
    margin: 0 !important;
    padding: 0 !important;
}

    .BoxSindacoFoto img {
        width: 90px !important;
        height: 90px !important;
        min-height: 90px !important;
        object-fit: cover !important;
        border-radius: 10px 0 0 10px !important;
        border: none !important;
        box-shadow: none !important;
        display: block !important;
        margin: 0 !important;
    }

.rSindaco:first-child, .rPartito:first-child, .rConsigliere:first-child {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #fff 100%);
}

.rSindaco:hover, .rPartito:hover, .rConsigliere:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-gradient {
    background: #f8f9fa;
}

.nome-partito-modern {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}
