:root { --colore-principale: #5e7153; --colore-secondario: #8c9c83; --sfondo: #f4f7f6; }

/* Flexbox per centrare in automatico la finestra */
body { 
    font-family: 'Arial', sans-serif; 
    padding: 20px; 
    color: #333; 
    margin: 0; 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-sizing: border-box;
    background: transparent !important; /* Per far vedere il video */
}

.container { 
    width: 100%; 
    max-width: 600px; 
    background: white; 
    margin: 0; 
    padding: 40px; 
    border-radius: 10px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    position: relative; 
}

h1 { color: var(--colore-principale); text-align: center; font-family: 'Georgia', serif; margin-top: 10px; min-height: 38px; }
p.desc { text-align: center; color: #666; margin-bottom: 30px; font-size: 15px; line-height: 1.5; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
label { display: block; margin-top: 15px; font-size: 13px; font-weight: bold; color: #555; }
input, textarea, select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 15px; margin-top: 5px; font-family: inherit; background-color: white !important;} /* Aggiunto background white per Flatpickr */
button { width: 100%; background: var(--colore-principale); color: white; border: none; padding: 15px; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 25px; transition: 0.3s; }
button:hover { background-color: var(--colore-secondario); }

/* GESTIONE CAMBIO LINGUA */
.lang-switcher { position: absolute; top: 15px; right: 20px; display: flex; gap: 10px; }
.lang-btn { cursor: pointer; font-size: 22px; filter: grayscale(100%); transition: 0.3s; opacity: 0.5; user-select: none; }
.lang-btn.active { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }

[lang="en"] { display: none !important; }
body.lang-en [lang="it"] { display: none !important; }
body.lang-en [lang="en"] { display: inline !important; }

@media (max-width: 600px) { 
    body { padding: 10px; }
    .container { padding: 30px 20px; margin: 10px auto; }
    .grid { grid-template-columns: 1fr; gap: 0; } 
    .lang-switcher { top: 10px; right: 15px; }
    h1 { font-size: 24px; margin-top: 20px; }
}

/* STILE VIDEO IMMERSIVO */
.video-sfondo {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: -1;
}

/* EFFETTO VETRO SMERIGLIATO */
.glass-effect {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* MACCHINA DA SCRIVERE CURSORE */
.cursor { display: inline-block; width: 2px; background-color: var(--colore-principale); animation: blink 0.7s infinite; margin-left: 2px; height: 1em; vertical-align: bottom; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

/* WIDGET WHATSAPP */
.wa-float { position: fixed; bottom: 20px; right: 20px; background-color: #25d366; color: white; border-radius: 50px; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; box-shadow: 2px 2px 15px rgba(0,0,0,0.2); z-index: 100; transition: transform 0.3s; text-decoration: none; }
.wa-float svg { margin-top: -2px; }
.wa-float:hover { transform: scale(1.1); }
.wa-bubble { position: fixed; bottom: 90px; right: 20px; background: white; padding: 15px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 100; width: 220px; font-size: 14px; line-height: 1.4; display: none; opacity: 0; transition: opacity 0.5s; border-left: 4px solid #25d366; }
.wa-close { position: absolute; top: 2px; right: 8px; cursor: pointer; color: #999; font-size: 18px; font-weight: bold; }
.wa-close:hover { color: #333; }
.wa-bubble-tail { content: ''; position: absolute; bottom: -10px; right: 20px; border-width: 10px 10px 0; border-style: solid; border-color: white transparent transparent transparent; }

/* STILE DATE OCCUPATE CALENDARIO */
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 0, 0, 0.4) !important;
    text-decoration: line-through;
    background: rgba(255, 0, 0, 0.05);
}