/* ===== ADAPTIVE ARTISTS NAVIGATION STYLES ===== */

/* ===== DESKTOP NAVIGATION ===== */
.modern-nav-bg {
    background: rgba(255, 255, 255, 0); /* semi-transparent white */
    backdrop-filter: blur(0px);
    transition: all 0.3s var(--ease-out);
    position: relative; /* Added for dropdown positioning */
}

.modern-nav-bg.scrolled {
    background: rgba(255, 255, 255, 0.5); /* semi-transparent white */
    backdrop-filter: blur(6px);
    transition: background 0.2s var(--ease-out);
}

.modern-nav-bg.scrolled .modern-nav-link {
    color: var(--aa-primary) !important;
}

.modern-nav-bg.scrolled:hover .modern-nav-link {
    color: var(--aa-primary-dark) !important;
}

.modern-nav-bg:hover {
    background: rgba(255, 255, 255, 1); /* semi-transparent white */
    transition: background 0.2s var(--ease-out);
}

.modern-nav-bg:hover .modern-nav-link {
    color: var(--aa-primary-dark) !important;
}

.modern-nav-link {
    color: var(--aa-light) !important;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.0) !important;
    border: none;
    /* Make padding responsive */
    padding: clamp(0.25rem, 1.5vw, 0.5rem) clamp(0.5rem, 2vw, 1rem);
    margin: 0 clamp(0.125rem, 0.5vw, 0.25rem);
    /* Make font size responsive */
    font-size: var(--text-xs);
    transition: all 0.3s var(--ease-out);
    text-decoration: none !important;
    display: inline-block;
    border-radius: clamp(0.25rem, 1vw, 0.5rem);
}

.modern-nav-link.active,
.modern-nav-link:hover,
.modern-nav-link:focus {
    color: #cfc2f2 !important;
    background: rgba(207, 194, 242, 0.2) !important;
    box-shadow: var(--elevation-1);
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* Override hover colors when nav is scrolled or hovered */
.modern-nav-bg.scrolled .modern-nav-link.active,
.modern-nav-bg.scrolled .modern-nav-link:hover,
.modern-nav-bg.scrolled .modern-nav-link:focus {
    color: var(--aa-primary-dark) !important;
    background: rgba(127, 112, 155, 0.15) !important;
}

.modern-nav-bg:hover .modern-nav-link.active,
.modern-nav-bg:hover .modern-nav-link:hover,
.modern-nav-bg:hover .modern-nav-link:focus {
    color: var(--aa-primary-dark) !important;
    background: rgba(107, 90, 131, 0.2) !important;
}

.nav-links-row {
    /* Make height responsive */
    min-height: clamp(48px, 12vw, 64px);
    /* Make gap responsive */
    gap: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(0.25rem, 1vw, 0.5rem) clamp(0.5rem, 2vw, 1rem) 0 clamp(0.5rem, 2vw, 1rem);
}

/* ===== DROPDOWN NAVIGATION ===== */
.nav-dropdown-container {
    position: static;
}

.nav-dropdown-menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100vw;
    background: rgba(248, 246, 251, 0.98); /* Use --aa-light with slight transparency */
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 1025;
    margin: 0;
    border-bottom: 1px solid rgba(127, 112, 155, 0.1); /* Use --aa-primary for border */
    max-height: 60vh; /* Limit height to 60% of viewport */
    overflow-y: auto;
}

/* White dropdown when navbar is hovered */
.modern-nav-bg:hover .nav-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(127, 112, 155, 0.15);
}

.modern-nav-bg .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.nav-dropdown-container:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */
    gap: 0;
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: none; /* Remove max-width constraint */
    margin: 0; /* Remove auto margins to align left */
}

.nav-dropdown-section {
    padding: 0.5rem 0.5rem;
    border-right: 1px solid rgba(127, 112, 155, 0.1); /* Use --aa-primary for borders */
}

.nav-dropdown-section:last-child {
    border-right: none;
}

.nav-dropdown-section h5 {
    color: var(--aa-primary); /* Use primary color for headings */
    font-size: var(--text-xs);
    font-weight: 900;
    margin: 0 0 0.75rem 0;
    padding: 0 0 0.5rem 0;
    border-bottom: 1px solid rgba(127, 112, 155, 0.2); /* Use --aa-primary for border */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Darker headings when navbar is hovered */
.modern-nav-bg:hover .nav-dropdown-section h5 {
    color: var(--aa-primary-dark);
    border-bottom: 1px solid rgba(107, 90, 131, 0.3);
}

.nav-dropdown-link {
    display: block;
    color: var(--aa-primary-light) !important; /* Use lighter primary for links */
    text-decoration: none !important;
    padding: 0.25rem 0.25rem;
    font-size: var(--text-xs);
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    margin: 0.125rem 0;
    position: relative;
}

/* Darker link colors when navbar is hovered */
.modern-nav-bg:hover .nav-dropdown-link {
    color: var(--aa-primary) !important;
}

.nav-dropdown-link:hover {
    color: var(--aa-primary-dark) !important;
    background: rgba(127, 112, 155, 0.08); /* Use --aa-primary for hover background */
    transform: translateX(2px);
}

/* Enhanced hover state when navbar is hovered */
.modern-nav-bg:hover .nav-dropdown-link:hover {
    color: var(--aa-primary-dark) !important;
    background: rgba(127, 112, 155, 0.12);
}

.nav-dropdown-link:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--aa-primary); /* Use primary color for accent line */
    border-radius: 0 2px 2px 0;
}

/* Darker accent line when navbar is hovered */
.modern-nav-bg:hover .nav-dropdown-link:hover::before {
    background: var(--aa-primary-dark);
}

/* Remove descriptions */
.nav-dropdown-description {
    display: none;
}

/* Dropdown trigger styling */
.dropdown-trigger {
    cursor: pointer;
    position: relative;
}

.dropdown-trigger::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.nav-dropdown-container:hover .dropdown-trigger::after {
    transform: rotate(180deg);
}

/* Ensure proper z-index hierarchy */
.custom-fixed-nav {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.nav-dropdown-menu {
    z-index: 1025; /* Below nav but above content */
}

/* ===== MOBILE NAVIGATION ===== */

/* Prevent dropdown from showing on mobile */
@media (max-width: 991.98px) {
    .nav-dropdown-menu {
        display: none !important;
    }
    
    /* Mobile nav background  */
    .modern-nav-bg {
        background: var(--aa-gradient-harmony-hero);
        backdrop-filter: blur(6px) !important;
    }

    /* Mobile icons and buttons - scrolled state */
    .modern-nav-bg.scrolled {
        background: var(--aa-gradient-harmony-hero);
        color: var(--aa-primary) !important;
    }

    /* Mobile icons and buttons - hovered state */
    .modern-nav-bg:hover {
        background: var(--aa-gradient-harmony-hero);
        color: var(--aa-primary-dark) !important;
    }

    .modern-nav-bg.scrolled .modern-nav-link {
        color: var(--aa-light) !important;
    }

    .modern-nav-bg:hover .modern-nav-link {
        color: var(--aa-light) !important;
    }

    /* Mobile button hover states */
    .modern-nav-bg.scrolled .mobile-menu-btn:hover,
    .modern-nav-bg.scrolled .mobile-menu-btn:focus {
        background: rgba(127, 112, 155, 0.15) !important;
    }

    .modern-nav-bg:hover .mobile-menu-btn:hover,
    .modern-nav-bg:hover .mobile-menu-btn:focus {
        background: rgba(107, 90, 131, 0.2) !important;
    }

    /* Mobile dropdown styling */
    .modern-nav-bg.scrolled .dropdown-menu {
        background: rgba(255, 255, 255, 0.98) !important;
        border: 1px solid rgba(127, 112, 155, 0.15) !important;
    }

    .modern-nav-bg:hover .dropdown-menu {
        background: rgba(255, 255, 255, 0.98) !important;
        border: 1px solid rgba(127, 112, 155, 0.2) !important;
    }

    .modern-nav-bg.scrolled .dropdown-item {
        color: var(--aa-primary) !important;
    }

    .modern-nav-bg:hover .dropdown-item {
        color: var(--aa-primary-dark) !important;
    }

    .modern-nav-bg.scrolled .dropdown-item:hover,
    .modern-nav-bg:hover .dropdown-item:hover {
        background: rgba(127, 112, 155, 0.1) !important;
        color: var(--aa-primary-dark) !important;
    }
}

/* ===== MOBILE OFFCANVAS NAVIGATION ===== */

/* Offcanvas Base Styles */
.offcanvas {
    width: 300px !important;
    border: none;
    box-shadow: var(--elevation-4);
}

.offcanvas-start {
    border-right: 1px solid rgba(var(--aa-primary-rgb), 0.1);
}

/* Header Styles */
.aa-mobile-nav-header {
    background: var(--aa-gradient-harmony-hero);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    position: relative;
}

.aa-mobile-nav-logo-container {
    position: relative;
    z-index: 2;
    min-height: 60px;
}

.aa-mobile-nav-logo {
    width: 120px;
    height: 50px;
    background-image: var(--aa-full-logo-light);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
}

/* Mobile Nav Close Button Override - Position in top right */
.offcanvas .btn-close {
    background-image: none;
    color: white;
    font-size: 1.2rem;
    opacity: 0.8;
    padding: 0.5rem;
    margin: 0;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    position: absolute !important;
    top: 7px !important;
    right: 15px !important;
    z-index: 20 !important;
    border: none;
}

.offcanvas .btn-close::before {
    content: 'x';
    font-size: 1rem;
    line-height: 1;
}

.offcanvas .btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: rotate(90deg);
}

/* Body Styles */
.aa-mobile-nav-body {
    background: linear-gradient(180deg, rgba(var(--aa-accent-cool-purple-rgb), 0.9) 0%, rgba(var(--aa-primary-rgb), 0.8) 50%, rgba(var(--aa-accent-coral-purple-rgb), 0.7) 100%);
    padding: 0;
}

.aa-mobile-nav-content {
    padding: 1rem 0;
    height: 100%;
    overflow-y: auto;
    background: transparent; /* Let the body gradient show through */
}

/* Navigation Items */
.aa-mobile-nav-item {
    margin: 0 1rem 0.5rem 1rem;
}

.aa-mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--aa-light) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: 0.75rem;
    transition: all 0.3s var(--ease-out);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.aa-mobile-nav-link:hover,
.aa-mobile-nav-link:focus,
.aa-mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(var(--aa-primary-rgb), 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Section Styles */
.aa-mobile-nav-section {
    margin: 0 1rem 0.75rem 1rem;
}

.aa-mobile-nav-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--aa-light);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.aa-mobile-nav-section-toggle:hover,
.aa-mobile-nav-section-toggle:focus {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(var(--aa-primary-rgb), 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.aa-mobile-nav-section-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.aa-mobile-nav-chevron {
    transition: transform 0.3s var(--ease-out);
    margin-left: 0.5rem;
}

/* Rotate chevron when expanded */
.aa-mobile-nav-section-toggle[aria-expanded="true"] .aa-mobile-nav-chevron {
    transform: rotate(180deg);
}

/* Collapse Styles */
.aa-mobile-nav-collapse {
    border-radius: 0 0 0.75rem 0.75rem;
    overflow: hidden;
    margin-top: 0.25rem;
}

.aa-mobile-nav-collapse.collapsing,
.aa-mobile-nav-collapse.show {
    background: rgba(var(--aa-primary-rgb), 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    backdrop-filter: blur(10px);
}

/* Submenu Styles */
.aa-mobile-nav-submenu {
    padding: 1rem;
}

.aa-mobile-nav-submenu-section {
    margin-bottom: 1.5rem;
}

.aa-mobile-nav-submenu-section:last-child {
    margin-bottom: 0;
}

.aa-mobile-nav-submenu-title {
    color: var(--aa-light);
    font-size: var(--text-xs);
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    padding: 0 0 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.aa-mobile-nav-submenu-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin: 0.125rem 0;
    background: transparent;
    border: 1px solid transparent;
}

.aa-mobile-nav-submenu-link:hover,
.aa-mobile-nav-submenu-link:focus {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    text-decoration: none !important;
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Special styling for buttons in submenu (like logout) */
.aa-mobile-nav-logout-btn {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    margin-top: 0.5rem;
    font-size: var(--text-xs) !important;
    font-weight: 500 !important;
    font-family: inherit;
}

.aa-mobile-nav-logout-btn:hover,
.aa-mobile-nav-logout-btn:focus {
    background: rgba(232, 124, 155, 0.15) !important;
    border-color: rgba(232, 124, 155, 0.3) !important;
    color: white !important;
    transform: translateX(4px);
}

/* Account Section Special Styling */
.aa-mobile-nav-account-section .aa-mobile-nav-section-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.aa-mobile-nav-account-section .aa-mobile-nav-section-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
}

.aa-mobile-nav-account-link {
    background: rgba(127, 112, 155, 0.15) !important;
    border-color: rgba(127, 112, 155, 0.25) !important;
}

.aa-mobile-nav-account-link:hover,
.aa-mobile-nav-account-link:focus {
    background: rgba(127, 112, 155, 0.25) !important;
    border-color: rgba(127, 112, 155, 0.35) !important;
}

/* Custom Scrollbar for Mobile Nav */
.aa-mobile-nav-content::-webkit-scrollbar {
    width: 6px;
}

.aa-mobile-nav-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.aa-mobile-nav-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.aa-mobile-nav-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive Adjustments for Mobile Nav */
@media (max-width: 575.98px) {
    .offcanvas {
        width: 280px !important;
    }
    
    .aa-mobile-nav-logo {
        width: 100px;
        height: 50px;
    }
    
    .aa-mobile-nav-link,
    .aa-mobile-nav-section-toggle {
        font-size: var(--text-xs);
        padding: 0.65rem 0.85rem;
    }
    
    .aa-mobile-nav-submenu-link {
        font-size: 0.75rem;
        padding: 0.45rem 0.65rem;
    }
}

/* Dark Mode Support for Mobile Nav (if needed in future) */
@media (prefers-color-scheme: dark) {
    .aa-mobile-nav-logo {
        background-image: var(--aa-full-logo-dark);
    }
}

/* Ensure proper layering */
.offcanvas {
    z-index: 1045 !important;
}

.offcanvas-backdrop {
    z-index: 1040 !important;
    background-color: rgba(var(--aa-dark-rgb), 0.5);
    backdrop-filter: blur(3px);
}

/* Animation Improvements */
.offcanvas.show {
    transform: translateX(0);
}

.offcanvas:not(.show) {
    transform: translateX(-100%);
}

/* Enhance focus states for accessibility */
.aa-mobile-nav-link:focus,
.aa-mobile-nav-section-toggle:focus,
.aa-mobile-nav-submenu-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}