/* Barra principal */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    background-color: #136f27;
    margin-top: auto;
    padding: 0;
    width: 100%;
    height: 7%;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* Secciones de navegaci�n */
.nav-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex: 1;
}

/* Dropup container */
.nav-item.dropup {
    width: 20%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make button take full size of its container */
.nav-item.dropup .btn.dropdown-toggle {
    width: 100%;
    height: 100%;
    padding: 0;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fix for dropdown button images */
.nav-item.dropup .btn img {
    width: 1.3rem;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Main navigation links */
.main-nav {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.main-nav .nav-link {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3.2rem; /* Match the height of other nav links */
    box-sizing: border-box;
}

.main-nav .nav-link img {
    width: 1.3rem;
    height: auto;
    margin: 0;
}

/* Style for dropup buttons */
.nav-item.dropup .btn.dropdown-toggle.nav-link {
    width: 100%;
    height: 100%;
    min-width: 40px;
    cursor: pointer;
}

/* Dropdown menu styling */
.dropdown-menu {
    width: 200px;
    padding: 8px 0;
    margin-bottom: 10px;
    transform: translateX(-30%);
    left: 30%;
}

.dropdown-item {
    padding: 8px 16px;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: keep-all;
    text-align: left;
}

/* Nav links styling */
.top-bar .nav-link,
.top-bar .nav-user,
.top-bar .nav-user-login {
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    position: relative;
}

/* Images in links */
.top-bar .nav-link img,
.borsiis-token,
.borsiis-bcoin,
.nav-user-login a img {
    width: 1.3rem;
    height: auto;
}

/* Hover effect */
.top-bar .nav-link:hover {
    background-color: #555;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    height: 100%;
}

/* Active state */
.top-bar .nav-link.active-nav,
.nav-user button.active-nav {
    background-color: #777;
    color: #fff;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    height: 100%;
}

.nav-link {
    font-size: 0.8rem;
    min-height: 3.2rem; /* Restore original min-height */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user {
    flex: 2;
}

.nav-user button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 0;
    text-decoration: none;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav-user-currency-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nav-user-currency-text {
    font-size: 0.8rem;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

/* Link de logout */
a.logout-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #000;
    text-align: center;
}

.nav-user-login {
    flex: 1;
}

.nav-user-login a img {
    width: 20px;
    height: auto;
}

@media (min-width: 768px) {
    .top-bar .nav-link img,
    .borsiis-token,
    .borsiis-bcoin,
    .nav-user button img,
    .nav-user-login a img {
        width: 2rem;
    }
    
    .main-nav .nav-link img {
        width: 2rem;
        height: auto;
    }
    
    .nav-link {
        font-size: initial;
        height: 100%;
    }
    
    .nav-link img {
        margin: 0;
    }
    
    .nav-user {
        flex: 1.2;
    }
    
    .dropdown-menu {
        width: 250px;
        font-size: 1.2rem;
    }
    
    .nav-user-login a img {
        width: 1.6rem;
    }

    .nav-user-info {
        font-size: 2rem;
        flex-direction: row;
        gap: 2.4rem;
    }
    
    .nav-user-currency-text {
        font-size: 1.2rem;
    }
    
    .nav-item.dropup .btn.dropdown-toggle {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .top-bar .nav-link img,
    .borsiis-token,
    .borsiis-bcoin,
    .nav-user button img,
    .nav-user-login a img {
        width: 2.2rem;
    }
    
    .main-nav .nav-link img {
        width: 2.2rem;
        height: auto;
    }
    
    .nav-link {
        font-size: initial;
        height: 100%;
    }
    
    .nav-link img {
        margin: 0;
    }
    
    .nav-user {
        flex: 1.2;
    }
    
    .dropdown-menu {
        width: 280px;
        font-size: 1.3rem;
    }
    
    .nav-user-login a img {
        width: 1.8rem;
    }

    .nav-user-info {
        font-size: 2.4rem;
        flex-direction: row;
        gap: 2.6rem;
    }
    
    .nav-user-currency-text {
        font-size: 1.3rem;
    }
}

@media (min-width: 1524px) {
    .top-bar .nav-link img,
    .borsiis-token,
    .borsiis-bcoin,
    .nav-user button img,
    .nav-user-login a img {
        width: 2.4rem;
    }
    
    .main-nav .nav-link img {
        width: 2.4rem;
        height: auto;
    }
    
    .nav-link {
        font-size: initial;
        height: 100%;
    }
    
    .nav-link img {
        margin: 0;
    }
    
    .nav-user {
        flex: 1.2;
    }
    
    .dropdown-menu {
        width: 300px;
        font-size: 1.4rem;
    }
    
    .nav-user-login a img {
        width: 2rem;
    }

    .nav-user-info {
        font-size: 2.8rem;
        flex-direction: row;
        gap: 3rem;
    }
    
    .nav-user-currency-text {
        font-size: 1.5rem;
    }
}
