/* --- RIMUOVE AURA BLU E FOCUS --- */
* {
    -webkit-tap-highlight-color: transparent;
}
button:focus, input:focus, a:focus {
    outline: none;
}
/* ------------------------------- */

body {
    margin: 0;
    background-color: white;
    font-family: 'IBM Plex Mono', monospace;
    display: flex;
    flex-direction: column;
    /* MODIFICATO: rimosso justify-content: center per evitare bug di scroll */
    align-items: center;
    min-height: 100vh; 
    overflow-x: hidden; 
    overflow-y: auto; /* Garantisce lo scroll verticale */
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    /* MODIFICATO: margin auto centra verticalmente solo se c'è spazio */
    margin: auto 0; 
    padding: 60px 0; /* Spazio extra per non toccare i bordi durante lo scroll */
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5vh 0; 
}

.animated-image {
    /* Altezza ottimizzata per 4 elementi */
    height: 17vh; 
    width: auto; 
    max-height: 250px; 
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Effetto Hover */
.animated-image:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.image-label {
    margin-top: 1vh; 
    font-size: 1.5em;
    font-size: min(1.5em, 4vh); 
}

/* --- STILI HAMBURGER MENU (FIX Z-INDEX) --- */
.hamburger-menu {
    position: fixed; /* Mantiene il menu in posizione anche scrollando */
    top: 20px;
    left: 20px;
    z-index: 1001;
}

.menu__btn {
    position: relative;
    display: flex;
    align-items: center;
    width: 26px;
    height: 26px;
    cursor: pointer;
    z-index: 1002; /* Sopra il box grigio per mostrare la X */
}

.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: black;
    transition-duration: .25s;
}

.menu__btn > span::before { content: ''; top: -8px; }
.menu__btn > span::after { content: ''; top: 8px; }

.menu__box {
    display: block;
    position: fixed;
    visibility: hidden;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    margin: 0;
    padding: 80px 0;
    list-style: none;
    background-color: #ECEFF1;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
    transition-duration: .25s;
    z-index: 1000;
}

.menu__item {
    display: block;
    padding: 12px 24px;
    color: black;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 20px;
    text-decoration: none;
    transition-duration: .25s;
}

.menu__item:hover {
    background-color: #CFD8DC;
}

#menu__toggle {
    display: none;
}

#menu__toggle:checked ~ .menu__btn > span { transform: rotate(45deg); }
#menu__toggle:checked ~ .menu__btn > span::before { top: 0; transform: rotate(0deg); }
#menu__toggle:checked ~ .menu__btn > span::after { top: 0; transform: rotate(90deg); }
#menu__toggle:checked ~ .menu__box {
    visibility: visible;
    left: 0;
}