/* Navigation
 * Includes: Horizontal menu styles (merged from horizontal-menu.css)
 */
.main-nav {
    background: var(--nav-bg);
    box-shadow: 0 2px 10px var(--nav-shadow);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav img {
    max-width: 250px;
}

.main-nav h1 {
    font-size: 0.1px;
    color: transparent;
    padding: 10px 10px 10px 0;
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand-link {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.brand-link:hover {
    opacity: 0.8;
}

.nav-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.nav-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95em;
    background: transparent;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.nav-search input::placeholder {
    color: var(--text-tertiary);
}

.nav-search .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--nav-link-color);
    font-weight: 500;
    padding: 20px 15px;
    display: block;
    transition: color 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-links a:hover {
    color: var(--nav-link-hover);
}

.nav-links a.active {
    color: var(--nav-link-hover);
    border-bottom-color: var(--nav-link-hover);
}

/* User profile dropdown */
.user-profile-dropdown {
    position: relative;
}

.profile-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.profile-button:hover {
    opacity: 0.8;
}

.profile-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    object-fit: cover;
    transition: border-color 0.3s ease;
}

.profile-button:hover .profile-avatar {
    border-color: var(--accent-secondary);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--card-shadow);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid var(--border-color);
}

.user-profile-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
}

.dropdown-role {
    font-size: 0.8em;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.9em;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-item-danger {
    color: #dc3545;
}

.dropdown-item-danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

.dropdown-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: currentColor;
    flex-shrink: 0;
}

/* Login button */
.nav-auth {
    display: flex;
    align-items: center;
}

.login-button {
    padding: 10px 20px;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background: var(--accent-secondary);
}

/* Hamburger menu button - hidden on desktop */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.hamburger-menu:hover {
    background: var(--hover-bg);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation when menu is open */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay - hidden by default */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: var(--card-bg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding-top: 70px;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-nav {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-nav-item {
    display: block;
    padding: 14px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.2s ease;
    font-size: 1em;
    font-weight: 500;
}

.mobile-nav-item:hover {
    background: var(--hover-bg);
}

.mobile-nav-item.active {
    background: var(--accent-primary);
    color: white;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0 20px;
}

.mobile-menu-auth {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--hover-bg);
    border-radius: 12px;
    margin-bottom: 10px;
}

.mobile-profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    object-fit: cover;
}

.mobile-user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1em;
}

.mobile-role {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.2s ease;
    font-size: 0.95em;
}

.mobile-menu-item:hover {
    background: var(--hover-bg);
}

.mobile-menu-item-danger {
    color: #dc3545;
}

.mobile-menu-item-danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

.mobile-menu-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.mobile-login-button {
    display: block;
    padding: 14px 20px;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease;
}

.mobile-login-button:hover {
    background: var(--accent-secondary);
}

/* Responsive design for nav */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 15px;
    }

    .nav-brand {
        flex: 1;
    }

    .nav-brand h1 {
        font-size: 20px;
        padding: 10px 0;
    }

    .main-nav img {
        max-width: 180px;
    }

    /* Hide search on mobile */
    .nav-search {
        display: none;
    }

    /* Hide desktop auth on mobile */
    .nav-desktop-auth {
        display: none;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
    }

    /* Show mobile menu overlay on mobile */
    .mobile-menu-overlay {
        display: block;
    }

    .nav-links {
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 10px;
        font-size: 14px;
    }

    .dropdown-menu {
        right: -10px;
    }
}

/* ==============================================
   HORIZONTAL MENU (merged from horizontal-menu.css)
   ============================================== */

/* Horizontal Menu with Dropdowns */
.horizontal-menu {
    max-width: 1400px;
    margin: 0 auto 25px;
    padding: 8px 20px 12px 20px;
    display: flex;
    gap: 30px;
    border-radius: 8px;
    flex-wrap: wrap;
}

.horizontal-menu .menu-item {
    position: relative;
}

.horizontal-menu .menu-label {
    font-family: Jost;
    font-weight: 500;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 5px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}

.horizontal-menu .menu-item.has-dropdown .menu-label {
    user-select: none;
}

.horizontal-menu .menu-label:hover {
    background: var(--hover-bg);
}

.horizontal-menu .menu-label.active {
    background: var(--accent-primary);
    color: white;
    gap: 1px;
    padding: 3px 15px;
}

.horizontal-menu .dropdown-arrow {
    transition: transform 0.2s;
}

.horizontal-menu .menu-item.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Horizontal Menu Dropdown */
.horizontal-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--card-shadow);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    padding-top: 4px;
    margin-top: 0;
}

.horizontal-menu .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
}

.horizontal-menu .menu-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.horizontal-menu .dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.horizontal-menu .dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.horizontal-menu .dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.horizontal-menu .dropdown-item:hover {
    background: var(--hover-bg);
}

.horizontal-menu .dropdown-item.active {
    background: var(--accent-primary);
    color: white;
    font-weight: 500;
}

/* Responsive Design for Horizontal Menu */
@media (max-width: 768px) {
    /* Hide desktop horizontal menu on mobile - use hamburger menu instead */
    .horizontal-menu {
        display: none;
    }
}
