/* =========================================
   1. VARIABILI E RESET GLOBALE
   ========================================= */
:root {
    --bg: #F5F3EE; /* Colore base panna */
    --dark: #20332B;
    --accent: #E6C031;
    --highlight: #B64939;
    --text-green: #415E5A; /* Verde scuro usato per i testi */
}

html, body {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
     padding-top: 60px; /* uguale all'altezza dell'header */
}

/* =========================================
   2. TIPOGRAFIA GENERALE
   ========================================= */
h1, h2, h3 {
    font-family: 'Roboto', sans-serif;
    color: var(--dark);
}

h2 {
    font-size: 20px;
    margin-bottom: 30px;
}

p, ul, li {
    font-family: 'Roboto Mono', monospace; 
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-green);
    margin-bottom: 20px;
}

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

ul {
    margin-left: 20px;
}

li {
    margin-bottom: 8px;
}

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

/* =========================================
   3. 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;
}

/* Bottoni Navigazione */
.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;
    background: rgba(32, 51, 43, 0.05);
    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;
}


/* =========================================
   4. TITOLI DI SEZIONE (Focus on / About)
   ========================================= */
.about-title {
    background-color: var(--bg); 
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 80px 40px 40px;
}

.about-heading {
    display: block;
}

.about-word {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-style: italic;
    font-size: 3.5rem; /* Leggermente adattato */
    color: var(--text-green); 
    display: block;
    line-height: 1;
}

.us-word {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 4rem;
    color: var(--text-green); 
    display: block;
    line-height: 1;
    text-transform: uppercase;
}


/* =========================================
   5. LAYOUT CONTENUTO PRINCIPALE (FIX IMMAGINI)
   ========================================= */

/* --- BLOCCO 1: SFONDO CHIARO (Banana + Sacco) --- */
.content-block {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    
    /* Flexbox per affiancare Testo e Immagini */
    display: flex;
    flex-direction: row; 
    align-items: center; /* Centra verticalmente */
    justify-content: space-between;
    gap: 60px; /* Distanza tra colonna testo e immagini */
}

/* Colonna Testo Generica */
.text-content {
    flex: 1.5; /* Il testo prende più spazio (60%) */
    min-width: 300px;
}

/* Colonna Immagini Generica */
.content-block .image-content {
    flex: 1;
    position: relative; /* fondamentale per il posizionamento assoluto delle immagini */
    height: 400px; /* altezza fissa del contenitore */
}

/* Immagini scrollabili (banana e sacco) */
.scroll-img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.05s linear;
}

/* Dimensioni e posizioni iniziali */
.scroll-img.banana {
    top:-550px;
    max-width:350px;
}

.scroll-img.lisca {
    top:-100px;
    max-width:300px;
}

.scroll-img.sacco {
    top:250px;
    max-width: 250px;
}


/* --- BLOCCO 2: SFONDO VERDE (Mela + Cestino) --- */
.green-section {
    background: var(--text-green); /* #415E5A */
    width: 100%;
    padding: 80px 40px;
    box-sizing: border-box;
    
    /* Flexbox per affiancare Testo e Immagini (Invertiti) */
    display: flex;
    flex-direction: row-reverse; /* Testo a sinistra (visivamente), Img a destra */
    align-items: center;
    justify-content: center;
    gap: 60px;
}

/* Adattamento colori per sfondo scuro */
.green-section p, 
.green-section ul, 
.green-section li, 
.green-section h2 {
    color: var(--bg); /* Testo chiaro */
}

.green-section .text-content {
    flex: 1.5;
    max-width: 600px;
}

.green-section .image-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; /* Spazio tra Mela e Cestino */
}

/* Reset Immagini Blocco 2 */
.green-section .image-content img {
    position: static !important;
    display: block;
    height: auto;
    margin: 0;
    transform: none;
}

/* Dimensioni specifiche */
.green-section .image-content img:nth-child(1) { max-width: 150px; } /* Mela */
.green-section .image-content img:nth-child(2) { max-width: 300px; } /* Cestino */

/* =========================================
   6. ANIMAZIONI (Opzionale)
   ========================================= 
 Se vuoi mantenere il "tremolio" tic-tac, mantieni queste classi.
   Se non le vuoi, puoi rimuovere questo blocco.
.tic-tac-image1, .tic-tac-image2, .tic-tac-image3 {
    animation-name: tic-tac;
    animation-timing-function: steps(1, end);
    animation-iteration-count: infinite;
}
.tic-tac-image1 { animation-duration: 2s; }
.tic-tac-image2 { animation-duration: 2.3s; }
.tic-tac-image3 { animation-duration: 1.8s; }

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

/* =========================================
   SCENA ANIMATA: MELA CHE ENTRA NEL BIDONE
   ========================================= */

.trash-scene {
    position: relative;
    height: 420px;
}

/* reset flex */
.trash-scene {
    display: block;
}

.apple {
    position: absolute;
    top: -305px; /* ben visibile all’inizio */
    left: 50%;
    transform: translateX(-50%);

    --fall: 0;

    transform:
        translateX(-50%)
        translateY(calc(var(--fall) * 260px))
        rotate(calc(var(--fall) * 40deg))
        scale(calc(1 - var(--fall) * 0.3));

    
    z-index: 2;
}


.apple img {
    width: 150px;
    height: auto;
    display: block;
}

.bin {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    z-index: 1;
}

/* 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 */
}

/* =========================================
   7. FOOTER
   ========================================= */
.footer {
    background: var(--bg);
    padding: 50px 60px;
    display: grid;
    grid-template-columns: 1.4fr 2px 1fr; 
    gap: 50px;
    align-items: start;
    border-top: 2px solid rgba(65, 94, 90, 0.2);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-green);
    margin: 4px 0;
    line-height: 1.4;
}

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

.contacts-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 30px;
    margin-top: 15px;
    margin-bottom: 30px;
}

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

.footer-divider {
    background: var(--text-green);
    opacity: 0.35;
    width: 2px;
    height: 100%;
    min-height: 200px;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.logos-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.footer-logo {
    height: 65px;
    width: auto;
    display: block;
    mix-blend-mode: multiply;
}

/* =========================================
   8. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 900px) {
    /* Layout Colonna Unica */
    .content-block, 
    .green-section {
        flex-direction: column !important;
        padding: 40px 20px;
        gap: 40px;
    }
    
    .text-content, .image-content {
        width: 100%;
        text-align: left; /* O center, se preferisci */
    }

    /* Footer Mobile */
    .footer {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
    }
    .footer-divider { display: none; }
    .contacts-grid { grid-template-columns: 1fr; gap: 5px; }
}