.menu-container {
    width: 97%;
    background-color: rgba(0, 0, 0, 0.7); /* Black transparent */
    position: relative;
    overflow: hidden;
    transition: height 0.5s ease; /* Smooth animation for height */
    display: flex;
    flex-direction: column;
    margin-top: 7%;
}


.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.menu li {
    flex: 1;
    text-align: center;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 15px;
    display: block;
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: pointer;
}

.menu a:hover {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    background-color: transparent !important; /* Evita qualsiasi colore di sfondo */
    box-shadow: none !important; /* Rimuove eventuali ombre */
}

/* Expanded content area with semi-transparent background */
.expanded-content {
    max-height: 0;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Matching transparency */
    color: white;
    padding: 0 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
}

.expanded-content.show {
    max-height: 500px; /* Adjust based on content */
    opacity: 1;
    padding: 20px;
}

.expanded-content img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

.submenu, .additional-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu li, .additional-submenu li {
    display: flex;
    align-items: center;
    font-size: 12px; /* Smaller font size */
}

.submenu a, .additional-submenu a {
    padding: 5px;
    color: white;
    text-decoration: none;
    display: block;
    margin-left: 10px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.submenu a:hover, .additional-submenu a:hover {
    color: #00ffff;
    text-shadow: 0 0 5px currentColor;
    background-color: transparent !important; /* Evita qualsiasi colore di sfondo */
    box-shadow: none !important; /* Rimuove eventuali ombre */
}

.circle {
    width: 8px; /* Smaller circle */
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    opacity: 0.5;
    transition: box-shadow 0.3s ease;
}

/* Set specific colors and their glow effect */
.submenu li:nth-child(1) .circle {
    border: 1px solid #00ffff;
}
.submenu li:nth-child(1):hover .circle {
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    animation: fadeInOut 1.5s infinite;
}

.submenu li:nth-child(2) .circle {
    border: 1px solid #00ff00;
}
.submenu li:nth-child(2):hover .circle {
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    animation: fadeInOut 1.5s infinite;
}

.submenu li:nth-child(3) .circle {
    border: 1px solid #ff00ff;
}
.submenu li:nth-child(3):hover .circle {
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    animation: fadeInOut 1.5s infinite;
}

.submenu li:nth-child(4) .circle {
    border: 1px solid #ff0000;
}
.submenu li:nth-child(4):hover .circle {
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    animation: fadeInOut 1.5s infinite;
}

.submenu li:nth-child(5) .circle {
    border: 1px solid #ffff00;
}
.submenu li:nth-child(5):hover .circle {
    box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
    animation: fadeInOut 1.5s infinite;
}

.submenu li:nth-child(6) .circle {
    border: 1px solid #0000ff;
}
.submenu li:nth-child(6):hover .circle {
    box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff;
    animation: fadeInOut 1.5s infinite;
}

.additional-submenu li:nth-child(1) .circle {
    border: 1px solid #ff0000;
}
.additional-submenu li:nth-child(1):hover .circle {
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    animation: fadeInOut 1.5s infinite;
}

.additional-submenu li:nth-child(2) .circle {
    border: 1px solid #00ff00;
}
.additional-submenu li:nth-child(2):hover .circle {
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    animation: fadeInOut 1.5s infinite;
}

.additional-submenu li:nth-child(3) .circle {
    border: 1px solid #ff00ff;
}
.additional-submenu li:nth-child(3):hover .circle {
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    animation: fadeInOut 1.5s infinite;
}

.additional-submenu li:nth-child(4) .circle {
    border: 1px solid #ffff00;
}
.additional-submenu li:nth-child(4):hover .circle {
    box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
    animation: fadeInOut 1.5s infinite;
}

.additional-submenu li:nth-child(5) .circle {
    border: 1px solid #0000ff;
}
.additional-submenu li:nth-child(5):hover .circle {
    box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff;
    animation: fadeInOut 1.5s infinite;
}

.additional-submenu li:nth-child(6) .circle {
    border: 1px solid #00ffff;
}
.additional-submenu li:nth-child(6):hover .circle {
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.expanded-content > ul:nth-child(3) {
    justify-self: end;
    text-align: right;
}

@media (max-width: 768px) {
    .menu-container {
        width: 90%;
    }

    .expanded-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .menu-container {
        width: 100%;
    }

    .menu a {
        padding: 10px;
    }
}
