* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html, body {
    height: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
body {
    background-color: #fff;
    color: #000;
    font-size: 16px;
    flex-grow: 1;
}
header {
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
}
header .logo {
    font-size: 1.5em;
    font-weight: 600;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
nav .menu {
    list-style: none;
    display: flex;
    gap: 20px;
}
nav .menu li {
    position: relative;
}
nav .menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}
nav .menu li a:hover {
    color: #ff6347;
}
.section {
    padding: 40px 20px;
    text-align: center;
}
.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
}
.section p {
    font-size: 1.2em;
    line-height: 1.5;
}
.gallery {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.work-item {
    transition: transform 0.3s;
    width: 30%;
}
.work-item:hover {
    transform: scale(1.1);
}
.work-item img {
    width: 100%;
    max-width: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.social-icons {
    margin-top: 20px;
}
.social-icon {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px;
    transition: background-color 0.3s;
}
.social-icon:hover {
    background-color: #ff6347;
}
footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 20px;
}
footer p {
    font-size: 1em;
}

/* Animazioni e Transizioni */
.social-icon, .work-item {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}
.social-icon:nth-child(1) { animation-delay: 0.5s; }
.social-icon:nth-child(2) { animation-delay: 1s; }
.social-icon:nth-child(3) { animation-delay: 1.5s; }
.work-item:nth-child(1) { animation-delay: 0.5s; }
.work-item:nth-child(2) { animation-delay: 1s; }
.work-item:nth-child(3) { animation-delay: 1.5s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Media Queries per la responsività */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav .menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 20px;
    }

    nav .menu li {
        width: 100%;
        text-align: left;
        padding: 10px 20px;
    }

    nav .menu li a {
        display: block;
        padding: 10px;
    }

    header .logo {
        margin-bottom: 10px;
    }

    .work-item {
        width: 100%;
        margin-bottom: 20px;
    }

    footer {
        font-size: 0.9em;
        padding: 15px;
    }

    .social-icon {
        padding: 8px 16px;
    }

    nav .menu.show {
        display: flex;
    }

    /* Bottone hamburger visibile su mobile */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle .bar {
        height: 3px;
        width: 100%;
        background-color: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .section h2 {
        font-size: 1.5em;
    }

    .section p {
        font-size: 1em;
    }

    .gallery {
        flex-direction: column;
        align-items: center;
    }

    .work-item {
        width: 80%;
    }
}

/* Animazione 3D Home */
.home-animation {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.cube {
    position: relative;
    width: 150px;
    transform-style: preserve-3d;
    animation: rotateCube 10s infinite linear;
    height: 150px;
}

.face {
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: #ff6347;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    border: 2px solid #fff;
}

.front  { transform: translateZ(75px); }
.back   { transform: rotateY(180deg) translateZ(75px); }
.right  { transform: rotateY(90deg) translateZ(75px); }
.left   { transform: rotateY(-90deg) translateZ(75px); }
.top    { transform: rotateX(90deg) translateZ(75px); }
.bottom { transform: rotateX(-90deg) translateZ(75px); }

@keyframes rotateCube {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Nascondi sezioni */
.hidden {
    display: none;
}

/* Video Background */
.video-box {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 100vh;
  overflow: hidden;
}

.video-box video {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
