::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background: #4b4a4a;
    border-radius: 10px;
}

/* Ensure the navbar container does not wrap its items */
.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

/* Keep logo and header text on the same line */
.logo-text-container {
    display: flex;
    align-items: center; 
    flex-grow: 1;
    flex-wrap: nowrap;
}

.center-logo {
    max-width: 100%;
    height: auto;
    margin-right: 5px; 
}

/* Let header text wrap internally but not force the logo to move */
.header_text {
    margin: 0; 
    padding: 0;
    text-align: left; 
    flex-grow: 1;
    min-width: 0; /* Critical: allows the header text to shrink/wrap without overflowing the flex container */
    overflow-wrap: anywhere; /* force breaks on long words/URLs */
}

/* Ensure the toggler remains in place */
.navbar-toggler {
    flex-shrink: 0;
}

/* Ensure the hamburger icon is visible on dark glass navbars */
.glass-theme .navbar {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.glass-theme .navbar .navbar-toggler { border-color: rgba(255,255,255,0.5); }

/* Offcanvas fallback (when Bootstrap JS is unavailable) */
body[data-offcanvas-fallback="1"] .offcanvas-fallback {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 90vw);
    background: var(--glass-fill, rgba(255,255,255,0.06));
    border-left: 1px solid rgba(255,255,255,0.18);
    box-shadow: -10px 0 30px rgba(0,0,0,0.35);
    backdrop-filter: blur(var(--glass-blur, 20px)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--glass-blur, 20px)) saturate(150%);
    color: #fff;
    /* Override Bootstrap's .offcanvas visibility/display rules */
    visibility: visible !important;
    display: block !important;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1045;
}
body[data-offcanvas-fallback="1"] .offcanvas-fallback.show {
    transform: translateX(0);
}
body[data-offcanvas-fallback="1"] .offcanvas-backdrop-fallback {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1040;
}
body[data-offcanvas-fallback="1"] .offcanvas-backdrop-fallback.show { opacity: 1; }

.glass-theme .offcanvas .navbar-nav .nav-item.dropdown {
    margin: 0px;
    padding: 0px;
}

@media (max-width: 576px) { 
    .header_text {
        font-size: 0.85rem !important; 
        white-space: normal; 
        max-width: 100%; /* Adjust as needed. Remove if you want header text to use more available space */
        text-align: left; 
    }
    .hide-on-mobile {
        display: none;
    }    
}
