/* navigation.css - Reusable Navigation Styles with Debug */

/* CSS Variables for Navigation */
:root {
    --primary-dark: #1a1a1a;
    --secondary-dark: #2d2d2d;
    --battleship-grey: #848482;
    --accent-grey: #6c757d;
    --light-grey: #e9ecef;
    --warm-white: #fefefe;
    --accent-light: #c8c9ca;
    --vintage-grey: #8e9aaf;
}

/* Floating Navigation Bar */
.floating-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 2rem;
    z-index: 1000;
    transition: all 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hide navigation when scrolling down */
.floating-nav.nav-hidden {
    transform: translateX(-50%) translateY(-100px);
    opacity: 0;
}

/* Show navigation when scrolling up */
.floating-nav.nav-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--warm-white);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.logo:hover {
    color: var(--accent-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--warm-white);
}

.nav-link.active {
    background: rgba(132, 132, 130, 0.2);
    color: var(--accent-light);
}

/* Disabled Navigation Link */
.nav-link.disabled {
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

.nav-link.disabled:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
}

/* Mobile Menu Toggle - FORCE VISIBLE FOR DEBUGGING */
.mobile-toggle {
    display: none; /* Will be overridden by media query */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s ease;
    position: relative;
    z-index: 1001;
    /* Debug styles */
    min-width: 40px;
    min-height: 40px;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger {
    width: 25px;
    height: 3px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.mobile-toggle.active .hamburger { background: transparent; }
.mobile-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}
.mobile-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Scroll Effects */
.floating-nav.scrolled {
    background: rgba(26, 26, 26, 0.98);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .floating-nav {
        top: 15px;
        left: 15px;
        right: 15px;
        transform: none;
        padding: 0.5rem 1.5rem;
    }

    .floating-nav.nav-hidden {
        transform: translateY(-100px);
    }

    .floating-nav.nav-visible {
        transform: translateY(0);
    }
}

/* FORCE MOBILE TOGGLE TO SHOW ON SMALL SCREENS */
@media (max-width: 768px) {
    .floating-nav {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 0.5rem 1rem;
    }

    .floating-nav.nav-hidden {
        transform: translateY(-100px);
    }

    .floating-nav.nav-visible {
        transform: translateY(0);
    }

        /* Transparent overlay when at the very top of the page */
    .floating-nav.at-top {
    /* Transparent/overlay look for hero emphasis */
    background: rgba(26, 26, 26, 0.15);
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    }

    /* Solid/readable when scrolled */
    .floating-nav:not(.at-top) {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.30);
    }

    /* Optional: when mobile menu is open, keep solid */
    .floating-nav.menu-open {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.30);
    }


    /* FORCE MOBILE TOGGLE TO DISPLAY */
    .mobile-toggle { 
        display: block !important;
        background: rgba(26, 26, 26, 0.98);
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        margin-top: 10px;
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

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

    .nav-link {
        display: block;
        padding: 1rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* EMERGENCY FALLBACK - SHOW ON VERY SMALL SCREENS */
@media (max-width: 480px) {
    .page-header h1 { font-size: 2rem; }
    .page-header { padding: 5rem 0 2rem; }
    .section h2 { font-size: 2rem; }
    .personnel-content { padding: 1.5rem; }
    .personnel-photo { width: 200px; height: 240px; }
}
/* -- NAV BAR FINAL OVERRIDES (keep at end of navigation.css) -- */
#navbar .nav-container { gap: 1rem; }
#navbar .logo { white-space: nowrap; }

@media (max-width: 768px) {
  #navbar.floating-nav { left: 10px; right: 10px; transform: none; padding: 0.5rem 1rem; }
  #navbar .mobile-toggle { display: block !important; }
  #navbar .nav-menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(26,26,26,0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
  }
  #navbar .nav-menu.active { display: flex; }
  #navbar .nav-link { display: block; width: 100%; text-align: left; padding: 0.75rem 0.75rem; font-size: 0.95rem; }
}