/* Stili generali */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1b1b2f; /* Blu scuro */
    color: #eaeaea;
    line-height: 1.6;
}

header {
    background: linear-gradient(to bottom, #243447, #1b1b2f); /* Blu scuro più chiaro a più scuro */
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    background: #162447; /* Blu scuro più tenue */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #00796b; /* Teal */
    border-bottom: 2px solid #ff7043; /* Arancione */
    padding-bottom: 0.5rem;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project {
    background: #1f4068; /* Blu con sfumature scure */
    border: 1px solid #162447;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}

.project:hover {
    transform: scale(1.05);
}

.project h3 {
    color: #ff7043; /* Arancione */
    margin-bottom: 0.5rem;
}

.project a {
    color: #00796b; /* Teal */
    text-decoration: none;
    font-weight: bold;
}

.project a:hover {
    text-decoration: underline;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #eaeaea;
}

form input, form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #394867;
    border-radius: 4px;
    font-size: 1rem;
    background: #1b1b2f;
    color: #eaeaea;
}

form button {
    background: #E97146;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background: #00796b; /* Teal */
}

footer {
    text-align: center;
    padding: 1rem;
    background: #162447; /* Blu scuro più tenue */
    color: #eaeaea;
    font-size: 0.9rem;
}

/* Stile base per la modale */
.modal {
    display: none; /* Nasconde la modale di default */
    position: fixed;
    z-index: 1000; /* Porta la modale sopra tutto il resto */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Sfondo semitrasparente */
}

/* Contenuto della modale */
.modal-content {
    background-color: #2b2f38; /* Colore scuro per abbinarsi al tema */
    margin: 10% auto; /* Centra il contenuto */
    padding: 20px;
    border-radius: 8px;
    width: 60%; /* Dimensione della modale */
    color: white; /* Colore del testo */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Pulsante chiudi */
.modal-content .close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content .close:hover,
.modal-content .close:focus {
    color: #f39c12; /* Cambia colore al passaggio del mouse */
    text-decoration: none;
}


/* Stile generale per il pulsante nascosto */
.hidden-button {
    position: fixed; /* Posizionamento fisso sullo schermo */
    top: 50%; /* Centra verticalmente */
    transform: translateY(-50%); /* Corregge il posizionamento verticale */
    width: 40px; /* Dimensioni del pulsante */
    height: 75px;
    background-color: #1d1d33; /* Colore simile allo sfondo */
    opacity: 0.2; /* Quasi invisibile */
    border-radius: 5px; /* Smussa i bordi */
    cursor: pointer;
    z-index: 1000; /* Porta il pulsante sopra gli altri elementi */
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

/* Mostra il pulsante al passaggio del mouse */
.hidden-button:hover {
    opacity: 0.8; /* Più visibile */
    background-color: #f39c12; /* Cambia colore */
}

/* Posiziona il pulsante a destra */
.right-button {
    right: 10px; /* Distanza dal bordo destro */
}

/* Posiziona il pulsante a sinistra (opzionale) */
.left-button {
    left: 10px; /* Distanza dal bordo sinistro */
}
