/* Basic reset */
body, ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Navbar styling */
.navbar {
    background-color: #333;
    padding: 10px 20px;
}

/* Menu styling */
.menu {
    display: flex;
    justify-content: center; /* Center align menu items */
    align-items: center;
}

.menu li {
    margin: 0 15px; /* Space between menu items */
}

.menu a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s, color 0.3s;
}

/* Hover effect */
.menu a:hover {
    background-color: #555;
    color: #fff;
    border-radius: 5px; /* Rounded corners on hover */
}

/* Active link styling (optional) */
.menu a.active {
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
}

/* Top Right Navigation */
.top-right-nav {
    display: flex; /* Ensure menu is a flex container */
    position: fixed; /* Fixed positioning for consistent placement */
    top: 20px; /* Aligns the menu 20px from the top */
    right: 20px; /* Aligns the menu 20px from the right */
    background-color: #005f86;
    border-radius: 5px;
    flex-direction: row; /* Align items horizontally by default */
    width: auto; /* Adjust width as needed */
    z-index: 1000; /* Ensure it is above other content */
}

/* Menu item styles */
.top-right-nav a {
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

/* Hover effect */
.top-right-nav a:hover {
    background-color: #0096c7;
}

/* Responsive Styles */

/* For tablets and mobile devices in landscape mode */
@media (max-width: 768px) {
    .navbar {
        padding: 7.5px 15px; /* Reduce padding by 25% */
        font-size: 12px; /* Reduce font size by 25% */
    }

    .menu {
        flex-direction: column; /* Stack menu items vertically */
        align-items: flex-start; /* Align items to the start */
        background-color: #333; /* Ensure background color is consistent */
        position: absolute; /* Position the menu absolutely */
        top: 50px; /* Adjust based on navbar height */
        left: 0;
        width: 100%; /* Full width */
        display: none; /* Hide menu by default */
        z-index: 1000; /* Ensure it is above other content */
    }

    .menu li {
        margin: 0; /* Remove horizontal margin */
    }

    .menu a {
        padding: 11.25px 15px; /* Increase padding for touch screens */
        font-size: 13.5px; /* Reduce font size by 25% */
    }

    .menu.show {
        display: flex; /* Show menu when toggled */
    }

    .navbar .menu-toggle {
        display: block; /* Show the menu toggle button */
        background-color: #333;
        border: none;
        color: white;
        font-size: 18px; /* Reduce font size by 25% */
        padding: 7.5px; /* Reduce padding by 25% */
        cursor: pointer;
    }

    .top-right-nav {
        flex-direction: column; /* Stack items vertically on small screens */
        display: flex; /* Ensure the menu is visible */
        width: auto; /* Ensure the width adjusts with content */
        top: 15px; /* Reduce top alignment by 25% */
        right: 15px; /* Reduce right alignment by 25% */
        padding: 7.5px; /* Reduce padding by 25% */
    }

    /* Smaller font size and padding for smaller screens */
    .top-right-nav a {
        font-size: 14px; /* Reduce font size by 25% */
        padding: 7.5px 11.25px; /* Reduce padding by 25% */
    }
}

/* For mobile devices in portrait mode */
@media (max-width: 480px) {
    .navbar {
        padding: 5px 15px; /* Further reduce padding */
        font-size: 9px; /* Further reduce font size */
    }

    .menu a {
        padding: 10px 15px; /* Reduce padding */
        font-size: 12px; /* Further reduce font size */
    }

    .top-right-nav a {
        font-size: 10px; /* Further reduce font size */
        padding: 5px 10px; /* Further reduce padding */
    }

    .top-right-nav {
        top: 10px; /* Further adjust top alignment */
        right: 10px; /* Further adjust right alignment */
        padding: 5px; /* Further reduce padding */
    }
}

/* Popup styling */
.hidden {
    display: none;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}
