/* ROOT E BODY: allineati al colore di header e footer */
:root {
    --bg: #F5F3EE; /* Colore base (header/footer/sfondo about US) */
    --dark: #20332B;
    --accent: #E6C031;
    --highlight: #B64939;
    --text-color: #283618; /* Colore scuro per i paragrafi */
}

html, body {
    scroll-behavior: smooth;
}

body {
    /* IMPOSTATO SU VAR(--bg) PER UNIFORMARE LO SFONDO SUPERIORE */
    background-color: var(--bg); 
    margin: 0;
    padding: 0;
    padding-top: 60px; /* uguale all'altezza dell'header */
}

/* SEZIONI CONTENUTO GENERICHE */
.content-block {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    gap: 80px;
    min-height: 60vh;
}

.content-block:nth-child(even) {
    flex-direction: row-reverse;
}

/* FONT GENERALI PER IL CONTENUTO */
h2 {
    font-family: 'Roboto', sans-serif; 
    font-size: 20px;
    color: #415E5A;
    margin-bottom: 30px;
}

p {
    /* TUTTI I PARAGRAFI: ROBOTO MONO */
    font-family: 'Roboto Mono', monospace; 
    font-size: 14px;
    line-height: 1.8;
    color: #415E5A;
    margin-bottom: 20px;
}

p.underline {
    text-decoration: underline;
    font-weight: 600;
}

ul {
    /* LISTE: ROBOTO MONO */
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #415E5A;
    margin-left: 20px;
    margin-bottom: 20px;
}

li {
    /* LISTE: ROBOTO MONO */
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 8px;
}

.bullet-points {
    list-style-type: disc;
    margin-left: 30px;
}


/* SEZIONI FLEX */
.text-content {
    flex: 1;
    min-width: 300px;
}

.image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ANIMAZIONI (NON MODIFICATE) */
.tic-tac-image1{
    height: auto;
    animation-name: tic-tac;
    animation-timing-function: steps(1, end);
    animation-iteration-count: infinite;
    animation-duration: 2s;
}

.tic-tac-image2{
    height: auto;
    animation-name: tic-tac;
    animation-timing-function: steps(1, end);
    animation-iteration-count: infinite;
    animation-duration: 2.3s;
}

.tic-tac-image3{
    height: auto;
    animation-name: tic-tac;
    animation-timing-function: steps(1, end);
    animation-iteration-count: infinite;
    animation-duration: 1.8s;
}

@keyframes tic-tac {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}


@media (max-width: 768px) {
    .content-block {
        flex-direction: column !important;
        padding: 40px 20px;
        gap: 40px;
    }
    
    h2 {
        font-size: 2rem;
    }

    .tic-tac-image {
        max-width: 80%;
    }
}


/* STILI HEADER */
#headerBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Mantieni la tua altezza */
    background: #e3e4df;
    border-bottom: 2px solid rgba(32, 51, 43, 0.15);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow-x: hidden;
    z-index: 1000; /* Sopra tutto il resto */
}

.header-left { 
    justify-self: start; 
    /* Aggiungi queste righe per allineare i due bottoni */
    display: flex;
    gap: 12px; /* Spazio tra i due bottoni */
    align-items: center;
}
.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-right {
    justify-self: end;
    display: flex;
    gap: 20px;
}

/* STILE LOGO MULTI-LINEA (ROBOTO) */
#siteLogo {
    display: flex;
    align-items: center;
}

#siteLogo img.logo-img {
    height: 55px;   /* sicuro dentro i 60px */
    max-height: 100%;
    width: auto;
    display: block;
}

/* LINK NAVIGAZIONE (ROBOTO MONO) */
.nav-btn, .nav-link {
    font-family: 'Roboto Mono', monospace; 
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
    text-decoration: none;
}

.nav-btn {
    padding: 10px 18px;
    border-radius: 20px;
    border: 2px solid var(--dark);
    background: transparent;
    transition: all 0.25s ease;
}

.nav-btn:hover {
    background: var(--dark);
    color: var(--bg);
    transform: translateY(-2px);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-btn.btn-secondary {
    border-color: transparent; /* Senza bordo */
    background: rgba(32, 51, 43, 0.05); /* Sfondo leggerissimo */
    color: var(--dark);
}

.nav-btn.btn-secondary:hover {
    border-color: var(--dark);
    background: transparent;
}

/* STATO PAGINA CORRENTE */
.nav-btn.active {
    background: var(--dark);
    color: var(--bg);
    border-color: var(--dark);
    transform: translateY(0);          /* niente effetto hover */
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
}

/* disattiva hover sul bottone attivo */
.nav-btn.active:hover {
    background: var(--dark);
    color: var(--bg);
    transform: none;
}


/* TITOLO PAGINA (about US) */
.about-title {
    /* SETTATO SU VAR(--bg) PER UNIFORMARE LO SFONDO SUPERIORE */
    background-color: var(--bg); 
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 80px 40px 40px;
}

/* CONTENITORE H1 */
.about-title h1, 
.about-heading {
    font-size: 3rem;
    letter-spacing: 2px;
    font-family: 'Roboto', sans-serif;
    color: #415E5A;
    display: block; /* Mantiene h1 come blocco */
}

/* ELEMENTI about e US - FORZATI SULLA STESSA RIGA */
.about-word, 
.us-word {
    /* Rimuove qualsiasi ereditarietà di display: block */
    display: inline-block; 
    vertical-align: top;
    font-family: 'Roboto', sans-serif;
    color: #415E5A;
}

/* Titolo "about" (Roboto Medium Italic) */
.about-word {
    font-weight: 500;     /* medium */
    font-style: italic;
    font-size: 4rem;
    margin-right: 15px; /* Spazio tra le due parole */
}

/* Titolo "US" (Roboto Semibold) */
.us-word {
    font-weight: 600;     /* semibold */
    font-style: normal;
    font-size: 4rem;
}

/* TESTO INTRODUTTIVO SOTTO IL TITOLO (about US) */
.about-intro {
    font-family: 'Roboto Mono', monospace; 
    
    /* MODIFICA: Utilizziamo padding laterale per limitare la larghezza (10% su ciascun lato) */
    padding: 0 10%; 
    
    /* Ridotto il margine superiore (era 40px) per avvicinarlo al titolo */
    margin: 20px auto 0 auto; 
    
    /* Rimuove max-width non necessario */
    font-size: 0.9rem;
    color: #415E5A;
    line-height: 1.6;
    text-align: center;
}


/* --- SEZIONE TEAM VERDE --- */
.team-section {
    background: #415E5A;
    padding: 60px 20px 100px;
}

.team-grid {
    display: grid;
    /* Responsive: se lo schermo è piccolo va a capo, altrimenti fa colonne uguali */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    justify-items: center;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--bg);
}

/* CONTENITORE CIRCOLARE DELLE FOTO */
.member-photo {
    position: relative; /* Serve per sovrapporre le immagini */
    width: 160px;       /* GRANDEZZA PREDEFINITA LARGHEZZA */
    height: 160px;      /* GRANDEZZA PREDEFINITA ALTEZZA */
    border-radius: 50%; /* Rende il div un cerchio perfetto */
    background-color: white; /* SFONDO BIANCO */
    overflow: hidden;   /* Taglia tutto ciò che esce dal cerchio */
    margin-bottom: 15px;
    }

/* STILE COMUNE PER LE DUE IMMAGINI (DEFAULT E HOVER) */
.member-photo img {
    position: absolute; /* Le sovrappone */
    top: 0;
    left: 0;
    width: 100%;        /* Occupa tutto il cerchio */
    height: 100%;
    object-fit: cover;  /* EVITA CHE SI STRETCHINO O DEFORMINO */
    transition: opacity 0.4s ease; /* Transizione morbida */
}

/* IMMAGINE DI BASE (Visibile all'inizio) */
.img-default {
    opacity: 1;
    z-index: 1;
}

/* IMMAGINE HOVER (Invisibile all'inizio) */
.img-hover {
    opacity: 0;
    z-index: 2; /* Sta sopra all'altra */
}

/* EFFETTO HOVER */
/* Quando passi sopra al cerchio, l'immagine hover appare e quella default sparisce */
.member-photo:hover .img-hover {
    opacity: 1;
}
.member-photo:hover .img-default {
    opacity: 0; /* Utile se le immagini hanno trasparenze, evita sovrapposizioni strane */
}


/* Font per nomi e ruoli delle cards */
.team-member h3,
.team-member p {
    font-family: 'Roboto Mono', monospace; 
}
/* nome */
.team-member h3 {
    margin-top: 5px;
    font-size: 1rem;
    font-weight: 600;
}

/* ruolo */
.team-member p {
    font-size: 0.85rem;
    color: var(--bg);
    font-weight: 400;
}

/* Font per nomi e ruoli delle cards */
.team-member h3,
.team-member p {
    font-family: 'Roboto Mono', monospace; 
}
/* nome */
.team-member h3 {
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 600;
}

/* ruolo */
.team-member p {
    font-size: 0.85rem;
    color: var(--bg);
    font-weight: 400;
}

/* --- TEAM CARD: ROLE & SKILLS --- */

.member-role {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 6px 0 14px;
    color: var(--accent);
}

/* Skills container */
.member-skills {
    list-style: none;
    padding: 0;
    margin: 0;
    
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--bg);

    /* allineamento più ordinato */
    text-align: left;
    max-width: 200px;
}

.team-member {
    gap: 6px;
}

/* singola skill */
.member-skills li {
    margin-bottom: 6px;
    padding-left: 10px;
    position: relative;
}

/* micro-dot minimale a sinistra */
.member-skills li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--bg);
    opacity: 0.6;
}

/* BACK TO TOP BUTTON */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;

  background-color: #415E5A; /* verde slider */
  color: #F5F3EE;            /* background */
  font-size: 20px;
  font-weight: bold;

  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:hover {
  background-color: #283618; /* verde scuro testo */
}

/* FOOTER */
.footer {
    background: var(--bg); /* O il tuo colore di sfondo es: #f0f0f0 */
    padding: 50px 60px;
    display: grid;
    /* Struttura a 3 colonne: Sinistra larga, linea sottile, Destra */
    grid-template-columns: 1.4fr 2px 1fr; 
    gap: 50px;
    align-items: start;
    border-top: 2px solid rgba(65, 94, 90, 0.2);
}

/* Stili Testo */
.footer p {
    font-size: 0.85rem;
    color: #415E5A; /* Il tuo colore verde scuro */
    margin: 4px 0;
    font-family: 'Roboto Mono', monospace; 
    line-height: 1.4;
}

.footer strong {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Griglia Nomi e Mail */
.contacts-grid {
    display: grid;
    grid-template-columns: auto 1fr; /* Colonna nomi si adatta, mail prende il resto */
    gap: 10px 30px; /* Spazio verticale e orizzontale */
    margin-top: 15px;
    margin-bottom: 30px;
}

/* Copyright piccolo */
.copyright-statement {
    font-size: 0.7rem !important;
    opacity: 0.7;
    margin-top: 20px;
    max-width: 90%;
}

/* Linea Divisoria */
.footer-divider {
    background: #415E5A;
    opacity: 0.35;
    width: 2px;
    height: 100%;
    min-height: 200px;
}

/* Colonna Destra */
.footer-right {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Spazio tra i blocchi di testo */
}

/* Loghi */
.logos-container {
    display: flex;
    align-items: center;
    gap: 30px; /* Ho aumentato un po' anche lo spazio tra i loghi per farli respirare */
    margin-top: 20px; /* Un po' più di margine sopra */
    flex-wrap: wrap;
}

.footer-logo {
    height: 65px; /* <<< QUI HO AUMENTATO LA DIMENSIONE (era 40px) */
    width: auto;  /* Mantiene le proporzioni */
    display: block;
    mix-blend-mode: multiply;
}

/* Responsive Tablet/Mobile */
@media (max-width: 900px) {
    .footer {
        grid-template-columns: 1fr; /* Tutto in una colonna */
        gap: 40px;
        padding: 40px 20px;
    }
    
    .footer-divider {
        display: none;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr; /* Nomi sopra, mail sotto o affiancati */
        gap: 5px;
    }
    
    /* Per mobile, magari vuoi nomi e mail vicini */
    .names p { display: block; font-weight: bold; margin-top: 10px; }
    .emails p { display: block; margin-bottom: 10px; }
}