/* Unified Navigation — Content Pages
   Prefix: un- (avoids conflicts with page-specific inline styles)
   Version: 2026021401
*/

/* ===== DESKTOP NAV BAR ===== */
.un-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 254, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 0 24px;
}

.un-container {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Brand / Logo */
.un-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.un-brand img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

/* Desktop links row */
.un-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.un-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.un-link:hover {
    color: #1e293b;
    background: #f1f5f9;
}

/* ===== DROPDOWN ===== */
.un-dropdown {
    position: relative;
}

.un-dropdown-toggle svg {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.un-dropdown.active .un-dropdown-toggle svg {
    transform: rotate(180deg);
}

.un-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    min-width: 220px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
    z-index: 1001;
}

.un-dropdown.active .un-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.un-dropdown-item {
    display: block;
    padding: 10px 14px;
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.un-dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.un-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 8px;
}

/* ===== AUTH SECTION ===== */
.un-auth {
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid #e2e8f0;
}

.un-signin,
.un-dashboard {
    font-weight: 600 !important;
    color: #2563eb !important;
}

.un-signin:hover,
.un-dashboard:hover {
    background: #eff6ff !important;
}

/* ===== MOBILE TOGGLE ===== */
.un-mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #475569;
    z-index: 1001;
}

.un-mobile-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.un-mobile-toggle .un-menu-close {
    display: none;
}

.un-mobile-toggle.active .un-menu-open {
    display: none;
}

.un-mobile-toggle.active .un-menu-close {
    display: block;
}

/* ===== MOBILE OVERLAY ===== */
.un-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.un-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== MOBILE DRAWER ===== */
.un-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100dvh;
    background: #fff;
    z-index: 999;
    padding: 80px 24px 24px;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.un-drawer.active {
    right: 0;
}

.un-drawer-links {
    display: flex;
    flex-direction: column;
}

.un-drawer-link {
    display: block;
    padding: 12px 0;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid #f1f5f9;
}

.un-drawer-link:last-child {
    border-bottom: none;
}

.un-drawer-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    padding: 12px 0 4px;
}

.un-drawer-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.un-drawer-cta {
    display: block;
    text-align: center;
    padding: 14px 24px;
    background: #2563eb;
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-top: 16px;
    transition: background 0.2s;
}

.un-drawer-cta:hover {
    background: #1d4ed8;
}

.un-drawer-signin,
.un-drawer-dashboard {
    color: #2563eb !important;
    font-weight: 600 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .un-links {
        display: none;
    }

    .un-mobile-toggle {
        display: block;
    }

    .un-nav {
        padding: 0 16px;
    }
}

/* Lock body scroll when drawer open */
body.un-menu-open {
    overflow: hidden;
}
