/* css/main-nav.css */
/* Styles for the main site-wide navigation header */

.main-navigation {
    background-color: var(--scottish-blue-50, #f1f5fe);
    border-bottom: 1px solid var(--color-neutral-200, #e2e8f0);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo .logo-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-neutral-900, #111827);
    text-decoration: none;
}

/* Progressive Logo Enhancement */
.nav-logo .logo-link {
    display: block;
    width: 180px;
    height: 48px;
    background: url('/images/bonnie-logo-twotone.svg') no-repeat center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

/* Hover feedback */
.nav-logo .logo-link:hover {
    opacity: 0.8;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .nav-logo .logo-link {
        width: 150px;
        height: 40px; /* Material-UI mobile standard */
    }
}

/* Fallback for failed loads */
.nav-logo .logo-link.error {
    background: none;
    text-indent: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-neutral-900, #111827);
}

.nav-links {
    display: none; /* Hidden on mobile */
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--color-neutral-700, #374151);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transition: background-color 0.3s ease-in-out;
    visibility: hidden;
}

.mobile-nav-overlay.active {
    right: 0;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: -300px; /* Start off-screen */
    width: 300px;
    max-width: 80%;
    height: 100%;
    background-color: #fff;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-nav-overlay.active .mobile-nav-content {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-neutral-200, #e2e8f0);
}

.mobile-nav-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
}

.mobile-nav-link {
    font-size: 1.1rem;
    color: var(--color-neutral-800, #1f2937);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: var(--scottish-heritage-light, rgba(0, 61, 165, 0.1));
    color: var(--scottish-blue, #003DA5);
}

.mobile-nav-link.active {
    background-color: var(--scottish-heritage-light, rgba(0, 61, 165, 0.1));
    color: var(--scottish-blue, #003DA5);
    border-left: 3px solid var(--heather-purple, #8B5CF6);
}


/* Desktop Styles */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
    .nav-link {
        font-size: 1rem;
        font-weight: 500;
        color: var(--color-neutral-600, #4b5563);
        text-decoration: none;
        padding-bottom: 4px;
        border-bottom: 2px solid transparent;
        transition: color 0.2s, border-color 0.2s;
    }
    .nav-link:hover {
        color: var(--scottish-blue, #003DA5);
        border-bottom-color: var(--scottish-blue, #003DA5);
    }
    
    .nav-link.active {
        color: var(--scottish-blue, #003DA5);
        border-bottom-color: var(--heather-purple, #8B5CF6);
    }
    .mobile-menu-toggle {
        display: none;
    }
} 