/* --- 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;
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    min-height: 100vh;
}

.video-container {
    padding: 20px;
    text-align: center;
    width: 80%;
    max-width: 800px;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}

video {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
}

.video-text {
    margin-top: 10px;
    font-size: 2em;
    font-family: 'IBM Plex Mono', monospace;
    /* Animazione per suggerire il click */
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02); 
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stili per la galleria di immagini */
.image-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; 
    width: 100%;
    max-width: 800px; 
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    max-height: 0; 
    overflow: hidden;
    padding: 0px 20px; 
    transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out, visibility 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.image-gallery.visible {
    opacity: 1;
    visibility: visible;
    max-height: 5000px; 
    padding: 40px 20px; 
}

.image-item {
    text-align: center;
    width: 200px;
    max-width: 200px;
}

.image-item img {
    max-width: 200px;
    width: 200px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.image-item .image-title {
    margin-top: 15px;
    font-size: 1.5em;
    font-family: 'IBM Plex Mono', monospace;
    color: black;
    width: 100%;
}

.image-item .image-caption {
    margin-top: 5px;
    font-size: 1em;
    font-family: 'IBM Plex Mono', monospace;
    color: #555;
    width: 100%;
}

/* STILI PER IL MODELLO 3D */
.model-item {
    text-align: center;
    width: 90%; 
    max-width: 600px; 
}

.model-item .image-title { 
    margin-top: 15px;
    font-size: 1.5em;
    font-family: 'IBM Plex Mono', monospace;
    color: black;
    width: 100%;
}

model-viewer {
    width: 100%; 
    height: 450px; 
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f8f8f8; 
}

/* Stili per l'hamburger menu */
.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1;
}

.menu__btn {
    position: relative;
    display: flex;
    align-items: center;
    width: 26px;
    height: 26px;
    cursor: pointer;
    z-index: 2;
}

.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;
}

.menu__item {
    display: block;
    padding: 12px 24px;
    color: black;
    /* MODIFICATO: Font allineato con la Home */
    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;
}

/* Media query */
@media (max-width: 600px) {
    .video-container {
        width: 95%;
        padding: 10px;
    }

    .image-gallery {
        gap: 30px;
        padding: 30px 10px;
    }

    .image-item {
        width: 150px;
        max-width: 150px;
    }

    .image-item img {
        max-width: 150px;
        width: 150px;
    }

    .image-item .image-title {
        font-size: 1.2em;
    }

    .image-item .image-caption {
        font-size: 0.9em;
    }

    .model-item {
        width: 95%; 
    }

    model-viewer {
        height: 300px; 
    }
}