/* ✅ Banda nera in alto con selettore lingua */
.top-bar {
    background: #000;
    color: white;
    height: 32px;
    padding: 0 20px; /* Aumentato padding per spostare il selettore più a sinistra */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
}

.language-selector {
    position: relative; /* Aggiunto per controllo preciso */
    margin-right: 10px; /* Spazio dal bordo destro */
}

.language-selector select {
    background-color: white;
    color: black;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 13px;
    height: 24px;
    box-sizing: border-box;
    min-width: 140px; /* Larghezza minima per evitare troncamenti */
    cursor: pointer;
}

.language-selector select:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.language-selector select:focus {
    outline: none;
    border-color: #ED6524;
    box-shadow: 0 0 3px rgba(237, 101, 36, 0.3);
}

/* 📄 Imposta spazio per la barra nera */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    padding-top: 60px; /* Spazio per la barra nera */
}

/* 🎯 Stile header */
.header {
    background: linear-gradient(135deg, #ED6524, #d44f0f);
    color: white;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 36px;
    margin: 10px 0;
}

.header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 📦 Contenuto centrale */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.buttons {
    text-align: center;
    margin: 40px 0;
}

.btn {
    display: inline-block;
    background: #ED6524;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background: #2563eb;
}

.btn-secondary:hover {
    background: #1d4ed8;
}

/* 🧩 Blocchi funzione */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.feature h3 {
    color: #ED6524;
    font-size: 24px;
    margin-bottom: 15px;
}

/* ⛱️ Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* ✅ Messaggio di logout */
.logout-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    text-align: center;
    margin: 0;
}

/* 📱 Responsive per mobile */
@media (max-width: 768px) {
    .top-bar {
        padding: 0 15px; /* Meno padding sui mobile */
    }
    
    .language-selector {
        margin-right: 5px; /* Meno margine sui mobile */
    }
    
    .language-selector select {
        font-size: 12px;
        height: 22px;
        padding: 1px 6px;
        min-width: 120px; /* Larghezza ridotta per mobile */
    }
    
    body {
        padding-top: 50px; /* Meno spazio su mobile */
    }
}

/* 📱 Responsive per schermi molto piccoli */
@media (max-width: 480px) {
    .language-selector select {
        min-width: 100px;
        font-size: 11px;
    }
    
    .top-bar {
        padding: 0 10px;
    }
}