/* ========================
   Root Variables
======================== */
:root {
    --primary-color: #333;
    --accent-color: #0f0942;
    --hover-bg: #eee;
    --nav-height: 56px;
    --padding-base: 1rem;
    --padding-sm: 0.5rem;
    --radius-sm: 4px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================
   Layout
======================== */
.top-nav-root {
    padding: var(--padding-base) 0;
}

.top-nav-desktop {
    display: flex;
    align-items: center;
    width: 100%;
    padding-right: var(--padding-base);
}

.nav-left,
.nav-right {
    display: flex;
    gap: var(--padding-base);
}

.nav-right {
    margin-left: auto;
}

/* ========================
   Navigation Links & Buttons
======================== */
.nav-link,
.nav-button,
.account-button {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-link {
    padding: var(--padding-sm) var(--padding-base);
}

.nav-link:hover {
    background-color: var(--hover-bg);
}

.nav-button,
.account-button {
    padding: 6px 12px;
    margin-right: var(--padding-base);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    background: none;
}

.nav-button:hover,
.account-button:hover {
    background-color: #ddd;
}

/* ========================
   Navigation Icons & Text
======================== */
.nav-link i,
.nav-button i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.nav-text {
    font-weight: 500;
    margin-left: 0.5rem;
}

/* ========================
   Logo
======================== */
.nav-logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.nav-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
    display: inline-block;
    vertical-align: middle;
}

/* ========================
   Mobile Header
======================== */
.mobile-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: var(--box-shadow);
    z-index: 1002;
}

.mobile-nav-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.mobile-nav-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-button.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-button.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-button.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================
   Hamburger Lines
======================== */
.hamburger-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ========================
   Mobile Navigation Menu
======================== */
.mobile-nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--nav-height));
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-menu.open {
    transform: translateX(0);
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 1rem;
}

/* ========================
   Mobile Nav Overlay
======================== */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* ========================
   Mobile Nav Links
======================== */
.mobile-nav-menu .nav-link {
    font-size: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #ddd;
    margin: 0 -20px;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-menu .nav-link:last-of-type {
    border-bottom: none;
}

.mobile-nav-menu .nav-link:hover {
    background-color: var(--hover-bg);
    padding-left: 28px;
}

.mobile-nav-menu .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* ========================
   Sidebar CTA Button
======================== */
.sidebar-cta {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #ccc;
}

.sidebar-cta button {
    width: 100%;
    padding: 12px;
    background-color: #6b46c1;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sidebar-cta button:hover {
    background-color: #553c9a;
}

/* ========================
   Responsive Media Queries
======================== */
@media (max-width: 480px) {
    .mobile-nav-menu {
        width: 100%;
        padding: 16px;
    }

    .mobile-nav-menu .nav-link {
        font-size: 18px;
        padding: 14px 16px;
        margin: 0 -16px;
    }

    .mobile-nav-menu .nav-link:hover {
        padding-left: 24px;
    }
}

@media (min-width: 769px) {
    .nav-link i,
    .nav-button i {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-link i,
    .nav-button i {
        display: inline-block;
    }
}

/* ========================
   Animations
======================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}