:root { --primary: #0d6efd; --secondary: #6c757d; --dark: #212529; --light: #f8f9fa; }

body { font-family: 'Segoe UI', system-ui, sans-serif; line-height: 1.6; color: var(--dark); margin: 0; background: var(--light); }

.hero { background: white; padding: 10px 20px 60px 20px; text-align: center; border-bottom: 1px solid #e9ecef; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.generator-card { 
    background: white; padding: 40px; border-radius: 24px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    margin: -60px auto 40px; position: relative; z-index: 10;
    max-width: 500px; text-align: center;
}

input { 
    width: 100%; padding: 15px; margin-bottom: 20px;
    border: 2px solid #dee2e6; border-radius: 12px; 
    font-size: 16px; transition: border-color 0.2s; 
    box-sizing: border-box; /* Evita che l'input esca dai bordi */
}

input:focus { border-color: var(--primary); outline: none; }

canvas { 
    background: white; padding: 15px; border: 1px solid #eee; 
    border-radius: 12px; margin-bottom: 5px;
    width: 250px !important; height: 250px !important;
}

button { 
    width: 100%; padding: 15px; cursor: pointer; border: none; 
    border-radius: 12px; background: var(--primary); color: white; 
    font-weight: 700; font-size: 18px; transition: all 0.3s; 
}

button:hover { transform: translateY(-2px); }

.content-section { padding: 60px 0; background: white; }

.bg-grey { background: var(--light); }

h2 { color: var(--primary); font-size: 28px; margin-top: 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }

@media (max-width: 768px) { .grid { grid-template-columns: 1fr; } }

.lang-switcher { margin-top: 20px; font-size: 14px; }

.lang-switcher a { color: var(--primary); text-decoration: none; margin: 0 10px; }

footer { padding: 40px; text-align: center; color: var(--secondary); font-size: 14px; }

.faq-item { margin-bottom: 25px; text-align: left; border-bottom: 1px solid #dee2e6; padding-bottom: 15px; }
.faq-item strong { color: var(--primary); display: block; font-size: 18px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: var(--secondary); }

/* Stile per il Banner Cookie */
#cookie-banner {
    border-top: 2px solid var(--primary);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
/* HEADER STYLES */
.main-header {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
}

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

.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

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

/* DROPDOWN LINGUE */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
}

.dropdown-content a {
    color: var(--dark);
    padding: 12px 16px;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: var(--light); 
}

.lang-dropdown:hover .dropdown-content {
    display: block;
}

.dropbtn {
    background: var(--light);
    padding: 8px 15px;
    border-radius: 20px; 
}
input[type=range] {
  -webkit-appearance: none;
  background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: #dee2e6;
  border-radius: 3px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #00acee; /* Colore azzurro come da tua immagine */
  cursor: pointer;
  margin-top: -9px;
  border: 3px solid white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* --- STILI PER MENU HAMBURGER (MOBILE) --- */

/* Nascondi il bottone hamburger su Desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333333; /* Adatta questo colore al testo del tuo header */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Media Query per Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Mostra l'hamburger su mobile */
    }

    .nav-menu {
        display: none; /* Nasconde il menu di base */
        position: absolute;
        top: 100%; /* Sotto l'header */
        left: 0;
        width: 100%;
        background-color: #ffffff; /* Sfondo del menu mobile */
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 20px 0;
    }

    /* Classe attiva quando l'hamburger è cliccato */
    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 15px;
    }

    .nav-menu ul li {
        width: 100%;
        text-align: center;
    }

    /* Adatta il dropdown delle lingue su mobile */
    .lang-dropdown .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f8f9fa;
        width: 100%;
        margin-top: 10px;
    }
    
    /* Animazione per trasformare l'hamburger in una 'X' quando è attivo */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}
