/* =========================================
   1. MAIN NAVBAR (The Strip at the top)
   Add this to fix the Side-by-Side Logo & Button
   ========================================= */
.navbar {
    display: flex; 
    justify-content: space-between; /* Pushes Logo to Left, Hamburger to Right */
    align-items: center; /* Vertically centers them */
    padding: 10px 20px; 
    width: 100%;
    box-sizing: border-box; 
    position: relative; /* Essential for the absolute menu to position correctly */
    z-index: 2000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px; 
}

/* =========================================
   2. HAMBURGER BUTTON (The Icon)
   ========================================= */
.menu-toggle {
    display: none; /* Hidden on Desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 2001; /* Must be higher than navbar */
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff; /* White bars for dark theme */
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Animation to X */
.menu-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* =========================================
   3. MOBILE DRAWER (The Floating Card)
   ========================================= */
/* --- responsive.css --- */

@media (max-width: 768px) {
    
    /* 1. Navbar Adjustments */
    .navbar {
        display: flex !important;
        flex-direction: row !important; /* Forces side-by-side */
        justify-content: space-between !important; /* Pushes Logo Left, Menu Right */
        align-items: center !important;
        width: 100%;
        padding: 15px 20px; /* Adjust padding as needed */
    }

    /* 2. Show the Hamburger Button */
    .menu-toggle {
        display: flex; /* Now we show it */
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 2001; /* Above the drawer */
    }
    
    .menu-toggle {
        display: flex !important; /* Ensure it is visible */
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        z-index: 2001;
        margin-left: auto; /* Extra safety: pushes it to the right */
    }

    /* Hamburger to X Animation */
    .menu-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* 3. The Side Drawer (Floating Card Style) */
    .nav-links {
        position: fixed;
        top: 70px; /* Adjust to sit below your specific navbar height */
        right: 15px;
        width: 250px;
        
        /* Reset Desktop Styles */
        height: auto; 
        max-height: 80vh;
        flex-direction: column; /* Stack links vertically */
        align-items: flex-start; /* Align text left */
        justify-content: flex-start;
        background: #111; /* Dark background matches your theme */
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        gap: 20px;

        /* Scroll Logic */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;

        /* Animation logic */
        transform: translateX(120%); /* Hide off-screen */
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0); /* Slide in */
    }

    /* 4. Link Styling adjustments for Mobile */
    .nav-links li {
        width: 100%;
        height: auto; /* Allow height to adjust */
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
        flex-shrink: 0;
        /* Optional: Add a bottom border to separate links */
        border-bottom: 1px solid rgba(255,255,255,0.05); 
        padding-bottom: 10px;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    /* Reset the underline animation or keep it simple */
    .nav-links a::after {
        display: none; /* Often cleaner to remove fancy hovers on mobile touch */
    }
}