/* Center the navigation bar (desktop/tablet default) */
.nav-buttons {
    margin: 0 auto; /* Center navigation container */
    display: flex;
    justify-content: center; /* Center buttons inside this container */
    gap: 2rem; /* Space between the buttons */
    padding: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.nav-links {
    flex-grow: 1; /* Make the navigation take up remaining space */
    display: flex;
    justify-content: center; /* Center the navigation buttons */
    align-items: center;
    gap: 2rem; /* Space between buttons */
}

/* Style for each button */
.nav-button {
    text-decoration: none; /* Remove underline */
    color: white; /* Text color */
    font-size: 1.1rem; /* Slightly larger font size */
    padding: 0.75rem 1.5rem; /* More padding for a better click target */
    border: 2px solid transparent; /* Border for hover effect */
    border-radius: 10px; /* Rounded corners */
    background: linear-gradient(135deg, #4d0eb3, #3a0891); /* Button gradient */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* Subtle shadow effect */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    text-transform: capitalize; /* Capitalize button text appropriately */
}

/* Add hover effect for better user interaction */
.nav-button:hover {
    background: linear-gradient(135deg, #3a0891, #4d0eb3);
    border-color: white; /* Highlighted border on hover */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25); /* Enhance shadow on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Active state for current page */
.nav-button.active {
    background-color: #1a1a1a; /* Darker background to show active page */
    color: #4d0eb3; /* Text contrast for active state */
    font-weight: bold; /* Emphasize active button */
    border-color: #4d0eb3; /* Add color to the border */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow */
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Larger, easier-to-tap hamburger target */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        width: 28px;
        height: 22px;
        padding: 10px;              /* increases hit area */
        margin-left: auto;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
    }

    .hamburger .line {
        background-color: white;
        height: 3px;
        width: 100%;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Ensure the dropdown anchors to the header area */
    .nav-container {
        position: relative;
    }

    /* Right-aligned dropdown that expands to the left and stays by the menu */
    .nav-buttons {
        display: none;                  /* hidden until hamburger is active */
        position: absolute;             /* anchor to the nav container near the hamburger */
        top: calc(100% + 8px);          /* just below the header bar */
        right: 0;                       /* align to the hamburger side */
        left: auto;
        width: max-content;             /* size to content (buttons stay normal size) */
        min-width: 240px;               /* reasonable minimum */
        max-width: min(90vw, 320px);    /* keep it within viewport */
        padding: 0.75rem;
        box-sizing: border-box;
        flex-direction: column;
        align-items: flex-start;        /* buttons keep natural width */
        justify-content: flex-start;
        gap: 0.6rem;
        background: #1b1b1b;
        border-radius: 10px;            /* floating panel look */
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
        z-index: 1000;

        /* Expand from the right edge (next to hamburger) to the left */
        transform-origin: right center;
        transform: scaleX(0.72);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.24s ease, opacity 0.24s ease, visibility 0s linear 0.24s;
    }

    .hamburger.active + .nav-buttons {
        display: flex;
        transform: scaleX(1);           /* expands leftward from the right edge */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    /* Buttons: normal size (not full width) */
    .nav-button {
        width: auto;                    /* natural width */
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0.7rem 1.1rem;         /* comfortable tap area */
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;                /* normal size buttons */
        line-height: 1.2;
        text-align: left;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.12);
        background: linear-gradient(135deg, #4d0eb3, #3a0891);
        white-space: nowrap;            /* keep labels tidy */
    }
}