
/* Navigation Container */
.nav-container {
    position: fixed;
    bottom: 5vh;
    right: 5vw;
    z-index: 1000;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 88px; /* Increased from 80px for better tap target */
    height: 88px; /* Increased from 80px for better tap target */
    border-radius: 8px;
    background: #ff8c00;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1001;
    padding: 0;
    /* Ensure minimum touch target size for mobile */
    min-width: 44px;
    min-height: 44px;
    /* Improve touch feedback */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-toggle svg {
    width: 44px; /* Increased from 40px for better visibility */
    height: auto;
    transition: all 0.3s ease;
    /* Ensure SVG is properly sized for the larger button */
    max-width: 100%;
    max-height: 100%;
}

.menu-toggle:hover {
    transform: scale(1.05);
}

.menu-toggle:active {
    transform: scale(0.95);
}


/* Menu Container */
.menu {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ff8c00;
    border-radius: 8px;
    
    /* Initial state - completely hidden behind button */
    width: 88px; /* Match the new button size */
    height: 88px; /* Match the new button size */
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Menu open state */
.menu.open {
    width: 90vw;
    height: 90vh;
    padding: 2rem 5rem 2rem 2rem;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); 
}

/* Menu Links */
.menu-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition-delay: 0s;
}

.menu.open .menu-links {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.menu-links li {
    margin: 1.2rem 0;
}

.menu-links a {
    color: white;
    text-decoration: none;
    font-weight: normal;
    font-size: 1.4rem;
    font-family: Georgia, serif;
    font-style: italic;
    display: block;
    padding: 1rem 0; /* Increased padding for better tap target */
    transition: all 0.3s ease;
    position: relative;
    /* Improve touch targets */
    min-height: 44px; /* Minimum touch target size */
    display: flex;
    align-items: center;
    /* Better touch feedback */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-links a:hover {
    transform: translateX(4px);
    color: rgba(255, 255, 255, 0.9);
}

.menu-links a:active {
    transform: translateX(2px) scale(0.98);
}

/* Staggered animation for menu items */
.menu-links li:nth-child(1) { transition-delay: 0.1s; }
.menu-links li:nth-child(2) { transition-delay: 0.15s; }
.menu-links li:nth-child(3) { transition-delay: 0.2s; }
.menu-links li:nth-child(4) { transition-delay: 0.25s; }
.menu-links li:nth-child(5) { transition-delay: 0.3s; }

.menu.open .menu-links li:nth-child(1) { transition-delay: 0.25s; }
.menu.open .menu-links li:nth-child(2) { transition-delay: 0.3s; }
.menu.open .menu-links li:nth-child(3) { transition-delay: 0.35s; }
.menu.open .menu-links li:nth-child(4) { transition-delay: 0.4s; }
.menu.open .menu-links li:nth-child(5) { transition-delay: 0.45s; }

/* Mobile responsiveness */
@media (max-width: 768px) {
    .nav-container {
        bottom: 4vh; /* Slightly higher on mobile */
        right: 4vw;
    }

    .menu-toggle {
        width: 80px; /* Slightly smaller on mobile but still good tap target */
        height: 80px;
    }

    .menu-toggle svg {
        width: 40px;
    }

    .menu {
        width: 80px; /* Match mobile button size */
        height: 80px;
    }

    .menu.open {
        width: 85vw; /* Use more screen width on mobile */
        height: 85vh;
        padding: 2rem 3rem 2rem 2rem;
    }

    .menu-links a {
        font-size: 1.2rem; /* Slightly smaller text on mobile */
        padding: 0.75rem 0;
    }
}

/* Ensure minimum tap targets on all devices */
@media (hover: none) and (pointer: coarse) {
    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .menu-links a {
        min-height: 44px;
        padding: 0.75rem 0;
    }
}

/* Backdrop overlay for mobile */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

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