/* ===================================================
   Navbar Unified — Modern Forum Navigation
   =================================================== */

.navbar-unified {
    --nav-bg: #1e2a3a;
    position: sticky !important;
    top: 0 !important;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.4rem 0;
    z-index: 1040 !important;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-unified.scrolled {
    --nav-bg: rgba(30, 42, 58, 0.95);
    background: var(--nav-bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Brand */
.navbar-unified .navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 10px 0 0;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.navbar-unified .navbar-brand:hover {
    opacity: 0.85;
}

.navbar-unified .brand-part1 {
    color: #fff;
}

.navbar-unified .brand-part2 {
    color: #0dcaf0;
}

/* Nav Links */
.navbar-unified .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.6rem 0.85rem !important;
    transition: color 0.2s ease;
    position: relative;
}

.navbar-unified .nav-link:hover,
.navbar-unified .nav-link:focus {
    color: #fff !important;
}

.navbar-unified .nav-link.active {
    color: #0dcaf0 !important;
}

/* Underline hover effect — desktop only */
@media (min-width: 992px) {
    .navbar-unified .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 60%;
        height: 2px;
        background: linear-gradient(90deg, #0dcaf0, #6dd5ed);
        border-radius: 2px;
        transition: transform 0.25s ease;
    }

    .navbar-unified .navbar-nav .nav-link:hover::after {
        transform: translateX(-50%) scaleX(1);
    }
}

/* Icon Links */
.nav-icon-unified {
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
    text-decoration: none !important;
    cursor: pointer;
}

.nav-icon-unified:hover {
    color: #fff;
}

/* Indicator badge */
.navbar-unified .indicator {
    background: #0dcaf0;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #1e2a3a;
    color: #fff;
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    height: 18px;
    width: 18px;
    line-height: 18px;
    text-align: center;
    position: absolute;
    right: -6px;
    top: -4px;
    transition: transform 0.2s ease;
}

/* Search Form */
.navbar-search-form {
    min-width: 200px;
}

.navbar-search-form .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.8rem;
    border-radius: 20px 0 0 20px;
    padding: 0.35rem 0.85rem;
}

.navbar-search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.navbar-search-form .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(13, 202, 234, 0.4);
    box-shadow: 0 0 0 0.15rem rgba(13, 202, 234, 0.12);
    color: #fff;
}

.navbar-search-form .btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0 20px 20px 0;
    transition: all 0.2s ease;
}

.navbar-search-form .btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* Guest Buttons */
.navbar-unified .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.navbar-unified .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.navbar-unified .btn-info {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    border: none;
}

/* Toggler */
.navbar-unified .navbar-toggler {
    border: 0;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.5rem;
}

.navbar-unified .navbar-toggler:focus {
    box-shadow: none;
}

/* Hide dropdown carets on icon buttons */
.navbar-unified .nav-icon-unified.dropdown-toggle::after {
    display: none;
}

/* User Actions Container */
.navbar-actions {
    gap: 0.15rem;
}

/* Mobile Collapse Styles */
@media (max-width: 991.98px) {
    .navbar-unified .navbar-brand {
        letter-spacing: 0px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex-shrink: 1;
        max-width: 40vw;
        display: block;
    }

    .navbar-actions {
        gap: 0 !important;
        flex-wrap: nowrap;
        overflow: visible;
        flex: 1 1 0%;
        min-width: 0;
        justify-content: flex-end;
    }
    .navbar-actions::-webkit-scrollbar {
        display: none;
    }

    .navbar-unified .nav-icon-unified {
        padding: 0.15rem 0.25rem; /* Even smaller padding */
    }

    .navbar-unified .navbar-collapse {
        background: #1e2a3a;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        margin-top: 0.5rem;
        padding: 0.75rem 0;
    }

    .navbar-unified .navbar-nav {
        gap: 0.15rem;
    }

    .navbar-unified .nav-link {
        padding: 0.5rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .navbar-unified .navbar-nav .nav-link::after {
        display: none;
    }

    .navbar-search-form {
        margin-top: 0.5rem;
        min-width: auto;
    }

    .navbar-actions .dropdown-menu {
        position: absolute !important;
        right: 0;
        left: auto;
        margin-top: 0.5rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Avatar adjustments in navbar */
.navbar-unified .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(13, 202, 234, 0.4);
    transition: border-color 0.2s ease;
}

.navbar-unified .avatar:hover {
    transform: none;
    border-color: #0dcaf0;
}

/* Fix status dot position in navbar */
.navbar-avatar-container {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.navbar-avatar-container .status-dot {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
    z-index: 2;
    border: 2px solid var(--nav-bg, #1e2a3a) !important;
}
