/* ================================================
   Main Navigation - Minimal Tab
   ================================================ */

.main-navigation {
    position: fixed;
    top: 80px;
    right: 0;
    transform: translateX(100%);
    z-index: 10000;
    background: rgba(39, 40, 51, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.35rem 0 0 0.35rem;
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    max-width: 220px;
}

.main-navigation:hover {
    transform: translateX(0);
}

/* Small tab that sticks out */
.nav-tab {
    position: absolute;
    left: 0;
    top: 1rem;
    transform: translateX(-100%);
    background: rgba(39, 40, 51, 0.95);
    border-radius: 0.35rem 0 0 0.35rem;
    padding: 0.5rem 0.4rem;
    cursor: pointer;
    box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-tab:hover {
    background: rgba(49, 50, 61, 0.95);
    padding-left: 0.5rem;
}

.nav-tab .menu-icon {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
    line-height: 1;
}

.nav-tab:hover .menu-icon {
    color: #ffffff;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 180px;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-left-color: #ffffff;
}


/* ================================================
   Responsive Design
   ================================================ */

/* Tablet */
@media screen and (max-width: 980px) {
    .main-navigation {
        max-width: 200px;
        top: 60px;
    }

    .nav-tab {
        top: 1rem;
        padding: 0.45rem 0.35rem;
    }

    .nav-tab .menu-icon {
        font-size: 0.95rem;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.45rem 0.7rem;
    }
}

/* Mobile */
@media screen and (max-width: 736px) {
    .main-navigation {
        top: auto;
        bottom: 20px;
        right: 20px;
        transform: translateX(100%);
        max-width: calc(100vw - 40px);
        border-radius: 0.5rem;
    }

    .main-navigation.open {
        transform: translateX(0);
    }

    .nav-tab {
        position: fixed;
        right: 20px;
        bottom: 20px;
        top: auto;
        left: auto;
        transform: none;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10001;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        background: rgba(39, 40, 51, 0.98);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

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

    .nav-tab .menu-icon {
        font-size: 1.5rem;
        color: #ffffff;
    }

    .nav-menu {
        padding: 1rem 0.8rem;
        gap: 0.5rem;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-link:active {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Extra small mobile */
@media screen and (max-width: 480px) {
    .main-navigation {
        bottom: 15px;
        right: 15px;
        max-width: calc(100vw - 30px);
    }

    .nav-tab {
        right: 15px;
        bottom: 15px;
        width: 52px;
        height: 52px;
    }

    .nav-tab .menu-icon {
        font-size: 1.4rem;
    }

    .nav-menu {
        max-height: 65vh;
        padding: 0.8rem;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
}

/* Dark/Light mode support */
@media (prefers-color-scheme: light) {
    .main-navigation {
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-link {
        color: rgba(0, 0, 0, 0.75);
    }

    .nav-link:hover,
    .nav-link.active {
        color: #000000;
    }

    .nav-toggle {
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-toggle span {
        background: rgba(0, 0, 0, 0.75);
    }

    .nav-toggle:hover span {
        background: #000000;
    }

    @media screen and (max-width: 736px) {
        .nav-menu {
            background: rgba(255, 255, 255, 0.98);
        }
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduce animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .main-navigation,
    .nav-link,
    .nav-toggle,
    .nav-toggle span,
    .nav-menu {
        transition: none;
    }
}

