/* Stilizacija hamburger menija */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    width: 30px;
    height: 20px;
    transform: rotate(0deg);
    transition: all 0.3s ease-in-out;
}

.bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    width: 100%;
    background-color: #333;
    opacity: 1;
    transform: rotate(0deg);
    transition: all 0.3s ease-in-out;
}

.bar:nth-child(1) {
    top: 0;
}

.bar:nth-child(2) {
    top: 10px;
}

.bar:nth-child(3) {
    top: 20px;
}

/* Animacija zatvaranja u X */
.burger-menu.active .bar:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.burger-menu.active .bar:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.burger-menu.active .bar:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

/* Stilovi za mobilnu navigaciju */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #222;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 15px;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: all 0.3s ease-in-out;
}

.mobile-nav.active {
    display: flex;
    opacity: 1;
    transform: scaleY(1);
    z-index: 10;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    padding: 10px;
    border-bottom: 1px solid #444;
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.mobile-nav.active a {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0.2s;
}

/* Prikazivanje burger menija na mobilnim uređajima */
@media screen and (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    .main-nav {
        display: none;
    }
    
    .mobile-nav {
        top: 120px;
    }
    
    .mobile-nav.active {
        z-index: 1000;
    }
}