/* --- 1. CORE NAVIGATION STYLES --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 1rem 5%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative; /* Needed for absolute positioning of mobile menu */
}

.nav-logo img {
    height: 60px; /* Adjust logo size */
}

/* --- 2. MOBILE MENU STYLES (Default) --- */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hide off-screen to the right */
    width: 70%;
    height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5rem;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
}

/* This class is toggled by JavaScript to show the menu */
.nav-menu.active {
    right: 0;
}

.nav-link {
    font-family: sans-serif;
    font-weight: 500;
    color: #333;
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: #fff;
}

.nav-link.active {
    color: #40e0d0;
    font-weight: 600;
}

/* --- 3. ACTION BUTTONS --- */
.nav-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-clear,
.btn-color {
    font-family: sans-serif;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.btn-clear {
    background-color: transparent;
    border: 1px solid #46976e;
    color: #555;
}

.btn-clear:hover {
    background-color: #46976e;
}

.btn-color {
    background-color: #40e0d0;
    border: 1px solid #40e0d0;
    color: #fff;
}

.btn-color:hover {
    background-color: #0056b3;
}

/* --- 4. HAMBURGER ICON --- */
.hamburger {
    display: block; /* Show on mobile */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Animate hamburger to an "X" when active */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- 5. DESKTOP STYLES (Media Query) --- */
@media (min-width: 992px) {
    .hamburger {
        display: none; /* Hide on desktop */
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        align-items: center;
        width: auto;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        padding-top: 0;
        right: 0; /* Reset position */
        transition: none;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        width: auto;
        min-width: 120px;
        font-size: small;
    }

    .nav-link.active {
        border-bottom: 2px solid #40e0d0;
    }

    .nav-actions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-left: 1rem; /* Space between links and buttons */
    }
}
