:root {
    --primary: #c53030;
    --primary-dark: #9b2c2c;
    --text: #1a202c;
    --light: #fdfdfd;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* Animazioni */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal-active {
    animation: fadeInUp 0.8s ease forwards;
}

/* Header */
header {
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span { color: var(--text); }

nav a {
    text-decoration: none;
    color: var(--text);
    margin-left: 2rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

nav a:hover { color: var(--primary); }

/* Hero */
.hero {
    padding: 10rem 8% 6rem;
    text-align: center;
    background: radial-gradient(circle at top right, #fff5f5 0%, #ffffff 100%);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero h1 span { color: var(--primary); }

.hero p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    color: #4a5568;
}

.btn {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(197, 48, 48, 0.2);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Sezioni e Card */
section { padding: 6rem 8%; }

.divider {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.card {
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid #f0f0f0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.card h3 { color: var(--primary); margin-bottom: 1rem; }

.contact-info {
    background: var(--primary);
    color: white;
    padding: 4rem 2rem;
    border-radius: 30px;
    text-align: center;
}

footer {
    background: #111;
    color: white;
    padding: 4rem 8%;
    text-align: center;
}

@media (max-width: 768px) {
    nav { display: none; }
    .hero { padding-top: 6rem; }
}



/* Layout Griglia Loghi */
.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    padding: 2rem 0;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 180px;
    text-align: center;
}

.logo-item img {
    width: 100%;
    height: auto;
    max-height: 120px; /* Evita che un logo sia gigantesco rispetto agli altri */
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.08));
    transition: var(--transition);
}

.logo-item:hover img {
    transform: scale(1.1) rotate(2deg);
}

.logo-item span {
    font-weight: 700;
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Animazione extra per lo scorrimento */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}


/* Stili della Sezione Poster */
.poster-section {
    background-color: var(--white);
    padding: 8rem 8% 6rem;
}

.poster-container {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.poster-text {
    flex: 1;
}

.poster-text h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.poster-text p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.slogan-civico {
    font-weight: 800;
    font-size: 1.5rem !important;
    color: var(--primary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 2rem 0;
}

.poster-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poster-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px; /* Angoli arrotondati come le card */
    box-shadow: 0 30px 60px rgba(0,0,0,0.1); /* Ombra morbida e profonda */
    transition: var(--transition);
}

/* Effetto di micro-interazione */
.poster-image img:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}

/* Pulsante opzionale con bordo */
.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
    margin-top: 2rem;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 25px rgba(197, 48, 48, 0.3);
}

/* Responsive per Mobile */
@media (max-width: 992px) {
    .poster-container {
        flex-direction: column-reverse; /* Il poster va sotto, il testo sopra */
        text-align: center;
        gap: 3rem;
    }
    
    .divider { margin: 0 auto 2rem !important; }
    
    .poster-text h2 { font-size: 2.2rem; }
    
    .slogan-civico { border-left: none; padding-left: 0; }
    
    .poster-image img {
        max-width: 90%;
        margin-top: 2rem;
    }
}



/* Stili Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: #a0aec0;
}

.candidate-list {
    margin-top: 2rem;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.candidate-name {
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 1rem;
    color: #2d3748;
}

.logo-item { cursor: pointer; }


/* Stile base per l'hamburger (visibile solo su mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 2001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #c53030; /* Colore rosso del tuo brand */
    transition: 0.3s;
}

/* Regole per schermi piccoli (Mobile) */
@media (max-width: 768px) {
    .hamburger {
        display: flex; /* Mostra l'hamburger su mobile */
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%; /* Nasconde il menu a destra */
        width: 100%;
        height: 100vh;
        background: white;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s ease-in-out;
        z-index: 2000;
    }

    /* Questa è la classe che lo script JavaScript attiva/disattiva */
    nav.active {
        right: 0; /* Porta il menu in vista */
    }

    /* Animazione Hamburger a X */
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
