/* Layout Components - NavMenu and MainLayout */

/* Main Page Layout */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    background: var(--bg-primary);
}

.main-content article {
    min-height: calc(100vh - 60px);
}

/* Navigation Bar */
.navbar-top {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    box-shadow: 0 12px 32px -18px rgba(18, 21, 46, 0.55);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
    margin-left: 3rem;
}

.navbar-links.collapse {
    display: flex;
}

.nav-main, .nav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: white !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 18px 36px -24px rgba(24, 28, 54, 0.45);
    min-width: 180px;
    overflow: hidden;
    z-index: 1001;
    display: block;
}

.dropdown-menu.collapse {
    display: none !important;
}

.dropdown-item {
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    display: block;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-item.active {
    background: rgba(124, 105, 255, 0.12);
    color: var(--accent-primary) !important;
}

.logout-form {
    margin: 0;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(15deg);
}

/* Mobile Navigation */
@media (max-width: 992px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .navbar-links.collapse {
        display: none;
    }

    .navbar-links.is-open {
        display: flex;
    }

    .nav-main, .nav-auth {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0;
        margin-left: 1rem;
    }

    .dropdown-item {
        color: white !important;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .dropdown-item.active {
        background: rgba(255, 255, 255, 0.25);
    }
}

