/* Variabili e Reset */
:root {
    --primary-color: #ffcc00;
    --text-color: #333333;
    --text-light: #666666;
    --bg-white: #ffffff;
    --bg-light: #f9f9f9;
    --font-main: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Tipografia */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }
.section-padding { padding: 80px 0; }
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* Bottoni */
.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-color);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: #e6b800;
    transform: translateY(-2px);
}

/* Navigazione */
.navbar {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.flex-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block; /* Aiuta a mantenere le proporzioni del link uguali a quelle dell'immagine */
    text-decoration: none;
}

.logo img {
    height: 60px;
    border-radius: 50%;
    cursor: pointer; /* Fa comparire la manina al passaggio del mouse */
    transition: transform 0.2s ease; /* Aggiunge una piccola animazione */
}

.logo img:hover {
    transform: scale(1.05); /* Ingrandisce leggermente il logo al passaggio del mouse */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

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

.hamburger { display: none; }

/* Slider / Hero Section */
.slider-section {
    height: 80vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    transition: background-image 1s ease-in-out;
}

.slider-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.slider-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Candidati Grid */
.grid-candidati {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card-candidato {
    background: var(--bg-white);
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-bottom: 5px solid var(--primary-color);
}

.card-candidato:hover {
    transform: translateY(-10px);
}

.card-candidato img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.card-candidato .ruolo {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Form Contatti */
.contact-wrapper {
    max-width: 600px;
    margin: auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-main);
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background: #222;
    color: white;
    padding: 40px 0 20px;
}

.footer-logo {
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
}

footer p {
    font-size: 0.9rem;
    color: #ccc;
}

.footer-link {
    color: var(--primary-color); /* Usa il giallo #ffcc00 */
    text-decoration: none;
    margin-left: 5px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }
    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--text-color);
    }
    .slider-content h1 { font-size: 2.5rem; }
}


/* --- Dettaglio Candidato --- */
.candidato-detail-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.candidato-image-box {
    flex: 1;
    max-width: 400px;
}

.candidato-image-box img {
    width: 100%;
    border-radius: 10px;
    border: 4px solid var(--primary-color);
}

.candidato-info-box {
    flex: 2;
}

.candidato-nome {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.candidato-info-box .ruolo {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 25px;
}

.candidato-bio p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.candidato-azioni {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-color);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
}


/* --- Pagina Adempimenti --- */
.adempimenti-container {
    margin-top: 50px;
}

.adempimenti-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.adempimento-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-width: 400px;
    flex: 1;
    min-width: 300px;
    transition: transform 0.3s ease;
}

.adempimento-card:hover {
    transform: translateY(-5px);
}

.adempimento-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.adempimento-card h3 {
    margin-bottom: 15px;
}

.adempimento-card p {
    margin-bottom: 25px;
    color: var(--text-light);
}


/* --- Pulsanti Contatti e Social --- */
.contact-buttons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
    margin-bottom: 40px;
}

.btn-large {
    font-size: 1.2rem;
    padding: 15px 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 39, 67, 0.4);
    color: #ffffff;
}

.icona-ig {
    margin-right: 10px;
    vertical-align: middle;
}


/* Responsive aggiornato per il menu mobile */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%; /* Si posiziona subito sotto l'header */
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        display: none; /* Nascosto di default */
        gap: 15px;
    }

    /* Classe che verrà aggiunta tramite JavaScript */
    .nav-links.active {
        display: flex; 
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001; /* Lo tiene sopra il menu aperto */
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--text-color);
        transition: all 0.3s ease;
    }

    /* Animazione dell'hamburger che diventa una 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);
    }

    .slider-content h1 { font-size: 2.5rem; }

    .candidato-detail-wrapper {
        flex-direction: column;
        padding: 20px;
    }
}