/* Bar styles */
.bar {
    display: flex;
    height: 60px;
    gap: 7%;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo div {
    display: flex;
    align-items: center;
}

.logo h3 {
    margin-left: 7px;
    font-size: 18px;
    font-weight: 700;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 40px;
    background: #3DCBB1;
}

.div-right {
   display: flex; 
   height: 100%;
    align-items: center;
}

.question {
    margin: 2px 24px;
}

.question img {
    height: 24px;
    width: 24px;
}

/* Langs styles */
.langs {
    position: relative;
    cursor: pointer;
    z-index: 1000;
}

.lang {
    width: 24px;
    height: 24px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 20px;
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    background: #0d1b2a;
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 8px;
    margin-top: 4px;
    z-index: 1001;
}

.lang-option {
    padding: 2px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    z-index: 1002;
}

.lang-option:hover {
    background: #3DCBB130;
}

.lang-option img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    display: block;
}
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-menu li {
    position: relative; /* Qo'shildi: absolute positionli hover effect uchun */
}

.nav-link {
    display: flex;
    flex-direction: row;
    padding: 8px 16px;
    text-decoration: none;
    color: white;
    border-radius: 6px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    gap: 8px; /* Rasm va matn orasidagi masofa */
}

.nav-link:hover {
    background: #3DCBB130;
    color: #3DCBB1;
    z-index: 1; /* Qo'shildi: hover holatda ustiga chiqadi */
}

.nav-container {
    position: relative;
    display: flex;
    margin-left:12px;
    justify-content: flex-end;
    align-items: center;
    background-color: #0d1b2a;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    margin-top:-6px;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 100; 
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}


/* Navigation image styles */
.nav-image {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}
/* Submenu styles */
.submenu .nav-link {
    justify-content: flex-start;
    padding: 8px 12px;
}

.submenu .nav-image {
    width: 20px;
    height: 20px;
}


/* Main menu image hover effect */
.nav-link:hover .nav-image {
    transform: scale(1.1);
}

/* Submenu images */
.submenu .nav-image {
    width: 20px;
    height: 20px;
    margin-right: 6px;
}

    
@media (max-width: 768px) {
    .nav-link {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;  /* markazlash o'rniga chapdan boshlash */
        text-decoration: none;
        color: white;
        padding: 12px 16px;
        border-radius: 6px;
        transition: all 0.3s ease;
        gap: 12px;  /* rasm va matn orasidagi masofa */
    }
     .nav-image {
        width: 20px;
        height: 20px;
    }

    .submenu .nav-image {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        padding: 6px 0px;
        background: #0d1b2a;
        flex-direction: column;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        border-radius: 6px;
        min-width: 200px;
        z-index: 99;
    }

    .nav-menu li {
        margin: 0.5rem 0;
        width: 100%;
    }

}
@media screen and (max-width: 480px) {
    .bar {
        height: 50px;
    }

    .logo div img {
        height: 24px;
        width: 24px;
    }

    .logo div h3 {
        font-size: 14px;
    }
}


/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Image loading state */
.nav-image.loading {
    opacity: 0.5;
    animation: imageLoading 1s infinite alternate;
}

@keyframes imageLoading {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Image error state */
.nav-image.error {
    opacity: 0.5;
    border: 1px solid #dc3545;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .nav-image {
        opacity: 0.9;
        filter: brightness(0.9);
    }
    
    .nav-link:hover .nav-image {
        opacity: 1;
        filter: brightness(1);
    }
}

/* Print styles */
@media print {
    .nav-image {
        display: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nav-image {
        transition: none;
    }
    
    .nav-link:hover .nav-image {
        transform: none;
    }
}
