/* Intuitive Menu Design - Ask Sage Focus */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(136, 176, 75, 0.2);
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.navbar-brand {
    font-family: 'Philosopher', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #88b04b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #5cdb95;
    text-decoration: none;
}

.navbar-brand i {
    margin-right: 0.5rem;
    color: #ffd700;
}

/* Primary Action Button */
.primary-action {
    display: flex;
    align-items: center;
}

.btn-ask-sage {
    background: linear-gradient(135deg, #88b04b, #2a4534);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(136, 176, 75, 0.3);
    border: 2px solid transparent;
}

.btn-ask-sage:hover {
    background: linear-gradient(135deg, #2a4534, #88b04b);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(136, 176, 75, 0.4);
}

.btn-ask-sage i {
    margin-right: 0.5rem;
}

/* Prominent Ask Sage Button */
.btn-ask-sage-prominent {
    background: linear-gradient(135deg, #88b04b, #5cdb95);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(136, 176, 75, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-ask-sage-prominent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-ask-sage-prominent:hover::before {
    left: 100%;
}

.btn-ask-sage-prominent:hover {
    background: linear-gradient(135deg, #5cdb95, #88b04b);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(136, 176, 75, 0.5);
}

.btn-ask-sage-prominent i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Desktop Icon Navigation */
.navbar-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(136, 176, 75, 0.1);
    border: 2px solid rgba(136, 176, 75, 0.3);
    color: #88b04b;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

/* Haptic Label Tooltip */
.nav-icon::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(21, 21, 48, 0.95);
    color: #88b04b;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(136, 176, 75, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-icon:hover::after,
.nav-icon:active::after {
    opacity: 1;
    bottom: -30px;
}

/* Haptic feedback on press */
.nav-icon:active {
    transform: translateY(-2px) scale(0.95);
    box-shadow: 
        0 2px 8px rgba(136, 176, 75, 0.3),
        0 0 15px rgba(92, 219, 149, 0.4);
}

.nav-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(92, 219, 149, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.nav-icon:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(92, 219, 149, 0.2);
    border-color: #5cdb95;
    color: #5cdb95;
    text-decoration: none;
    box-shadow: 
        0 8px 25px rgba(136, 176, 75, 0.4),
        0 0 20px rgba(92, 219, 149, 0.6);
}

.nav-icon:hover::before {
    left: 100%;
}

.nav-icon.login-btn {
    background: linear-gradient(135deg, #88b04b, #5cdb95);
    border-color: #5cdb95;
    color: white;
}

.nav-icon.login-btn:hover {
    background: linear-gradient(135deg, #5cdb95, #9acd32);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 
        0 10px 30px rgba(92, 219, 149, 0.5),
        0 0 25px rgba(92, 219, 149, 0.8);
}

.nav-icon.user-menu {
    background: linear-gradient(135deg, #2a4534, #88b04b);
    border-color: #88b04b;
    color: white;
}

.nav-icon.user-menu:hover {
    background: linear-gradient(135deg, #88b04b, #5cdb95);
}

/* Menu Toggle Button */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #88b04b;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Menu */
.navbar-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(42, 69, 52, 0.95));
    backdrop-filter: blur(20px);
    padding: 2rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(136, 176, 75, 0.2);
}

.navbar-menu.active {
    right: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

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

/* Menu Sections */
.menu-section {
    margin-bottom: 2rem;
}

.menu-heading {
    color: #88b04b;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(136, 176, 75, 0.2);
}

.menu-section a {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.menu-section a:hover {
    color: #88b04b;
    background: rgba(136, 176, 75, 0.1);
    padding-left: 1rem;
    text-decoration: none;
}

.menu-section a i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    color: #88b04b;
}

/* Special Links */
.upgrade-link {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(136, 176, 75, 0.1));
    border: 1px solid rgba(156, 39, 176, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem !important;
}

.upgrade-link:hover {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(136, 176, 75, 0.2));
    color: #9c27b0 !important;
}

.trial-link {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(136, 176, 75, 0.1));
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem !important;
}

.trial-link:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(136, 176, 75, 0.2));
    color: #ffc107 !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn-ask-sage {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .navbar-menu {
        width: 300px;
        padding: 1.5rem 1rem;
    }
    
    .primary-action {
        display: flex !important; /* Show on mobile - essential feature */
    }
    
    /* Make Ask Sage button more compact on mobile */
    .btn-ask-sage-prominent {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.95rem !important;
        border-radius: 20px !important;
    }
    
    .btn-ask-sage-prominent i {
        margin-right: 0.4rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .navbar-menu {
        width: 280px;
        right: -280px;
    }
    
    .menu-section a {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }
}

/* Desktop - Show icon navigation and hide mobile menu */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
    
    .navbar-icons {
        display: flex;
    }
    
    .navbar-menu {
        display: none;
    }
}

/* Mobile - Show essential icon navigation */
@media (max-width: 1023px) {
    .navbar-icons {
        display: flex !important;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    /* Make nav icons more compact on mobile */
    .nav-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    /* Hide tooltips on mobile to save space */
    .nav-icon::after {
        display: none;
    }
    
    .menu-section {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    .menu-heading {
        display: none;
    }
    
    .menu-section a {
        margin-bottom: 0;
        padding: 0.5rem 0;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .menu-section a:hover {
        padding-left: 0;
        background: transparent;
    }
    
    .upgrade-link,
    .trial-link {
        padding: 0.5rem 1rem !important;
        border-radius: 20px;
    }
    
    .menu-overlay {
        display: none;
    }
}

/* Animation for menu items */
.navbar-menu.active .menu-section {
    animation: slideInFromRight 0.5s ease-out forwards;
}

.navbar-menu.active .menu-section:nth-child(1) {
    animation-delay: 0.1s;
}

.navbar-menu.active .menu-section:nth-child(2) {
    animation-delay: 0.2s;
}

.navbar-menu.active .menu-section:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus states for accessibility */
.menu-toggle:focus,
.btn-ask-sage:focus,
.menu-section a:focus {
    outline: 2px solid #88b04b;
    outline-offset: 2px;
}

/* Ensure content doesn't hide behind navbar */
body {
    padding-top: 80px;
}

/* Scrollbar styling for menu */
.navbar-menu::-webkit-scrollbar {
    width: 6px;
}

.navbar-menu::-webkit-scrollbar-track {
    background: rgba(136, 176, 75, 0.1);
}

.navbar-menu::-webkit-scrollbar-thumb {
    background: rgba(136, 176, 75, 0.5);
    border-radius: 3px;
}

.navbar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(136, 176, 75, 0.7);
}

/* ====================================
   LABELED NAVIGATION ICONS
   Clear, accessible navigation with text labels
   ==================================== */

/* Labeled nav container */
.navbar-icons-labeled {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Individual labeled nav icon */
.nav-icon-labeled {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    background: rgba(136, 176, 75, 0.08);
    border: 1px solid rgba(136, 176, 75, 0.2);
    color: #88b04b;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 50px;
}

.nav-icon-labeled i {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.nav-icon-labeled .nav-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.85;
    white-space: nowrap;
}

.nav-icon-labeled:hover {
    background: rgba(92, 219, 149, 0.2);
    border-color: #5cdb95;
    color: #5cdb95;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 219, 149, 0.3);
}

.nav-icon-labeled:active {
    transform: scale(0.95);
}

.nav-icon-labeled.login-btn {
    background: linear-gradient(135deg, #88b04b, #5cdb95);
    border-color: #5cdb95;
    color: white;
}

.nav-icon-labeled.login-btn:hover {
    background: linear-gradient(135deg, #5cdb95, #9acd32);
    box-shadow: 0 6px 20px rgba(92, 219, 149, 0.4);
}

/* Clickable brand with home hint */
.navbar-brand-clickable {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.navbar-brand-clickable:hover {
    background: rgba(136, 176, 75, 0.15);
    transform: scale(1.02);
}

.brand-home-hint {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(136, 176, 75, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-brand-clickable:hover .brand-home-hint {
    color: #5cdb95;
}

/* Mobile adjustments for labeled icons */
@media (max-width: 768px) {
    .navbar-icons-labeled {
        gap: 0.15rem;
    }
    
    .nav-icon-labeled {
        padding: 0.3rem 0.4rem;
        min-width: 42px;
    }
    
    .nav-icon-labeled i {
        font-size: 0.95rem;
    }
    
    .nav-icon-labeled .nav-label {
        font-size: 0.5rem;
    }
    
    .brand-home-hint {
        display: none;
    }
}

/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
    .nav-icon-labeled {
        padding: 0.35rem 0.5rem;
        min-width: 46px;
    }
}