html {
    font-size: 16px; /* Base font size for rem units */
}

body {
    font-family: Arial, sans-serif;
    background-color: #001f3f;
    color: white;
    margin: 0;
    padding: 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #0064F0; /* Exact IRIC logo blue */
    padding: 1.25rem; /* 20px / 16px = 1.25rem */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    max-width: 12.5rem; /* 200px / 16px = 12.5rem */
    margin-left: auto;
    margin-right: 1.25rem; /* 20px / 16px = 1.25rem */
}

nav {
    flex-grow: 1;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 0.9375rem; /* 15px / 16px = 0.9375rem */
    align-items: center;
    justify-content: flex-start;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav ul li button {
    background: none;
    border: 1px solid white;
    color: white;
    padding: 0.3125rem 0.625rem; /* 5px/16px, 10px/16px */
    cursor: pointer;
    font-size: 1rem; /* 16px / 16px = 1rem */
}

main {
    flex: 1;
    padding: 3.125rem; /* 50px / 16px = 3.125rem */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1, h2 {
    color: white;
}

/* Black text for Contact and Registration pages */
.contact-page h1, .contact-page h2,
.registration-page h1, .registration-page h2 {
    color: black !important;
}

/* Partial transparency for the home section on index pages */
#home {
    background-color: rgba(0, 0, 0, 0.5);
    margin: 1.25rem auto; /* 20px / 16px = 1.25rem */
    padding: 1.25rem; /* 20px / 16px = 1.25rem */
    border-radius: 0.625rem; /* 10px / 16px = 0.625rem */
    width: 80%; /* Adjust width as needed */
    max-width: 56.25rem; /* 900px / 16px = 56.25rem */
}

/* Partial transparency for the registration and contact sections */
#registration, #contact {
    background: rgba(255, 255, 255, 0.5);
    margin: 1.25rem auto; /* 20px / 16px = 1.25rem */
    padding: 1.25rem; /* 20px / 16px = 1.25rem */
    border-radius: 0.625rem; /* 10px / 16px = 0.625rem */
    width: 80%; /* Adjust width as needed */
    max-width: 56.25rem; /* 900px / 16px = 56.25rem */
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    background: rgba(255, 255, 255, 0.2);
    margin: 0.625rem auto; /* 10px / 16px = 0.625rem */
    padding: 0.625rem; /* 10px / 16px = 0.625rem */
    width: 60%;
    border-radius: 0.625rem; /* 10px / 16px = 0.625rem */
}

footer {
    margin-top: auto;
    padding: 1.25rem; /* 20px / 16px = 1.25rem */
    background-color: #0064F0; /* Matching IRIC blue */
    color: white;
    font-size: 0.875rem; /* 14px / 16px = 0.875rem */
    text-align: center;
    width: 100%;
    position: relative;
    bottom: 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 0.9375rem; /* 15px / 16px = 0.9375rem */
    }

    #logo {
        margin: 0 0 0.9375rem 0; /* 15px / 16px = 0.9375rem */
        max-width: 9.375rem; /* 150px / 16px = 9.375rem */
    }

    nav {
        width: 100%;
        text-align: center;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.625rem; /* 10px / 16px = 0.625rem */
        margin-top: 0.625rem; /* 10px / 16px = 0.625rem */
    }

    nav ul li {
        margin: 0.3125rem; /* 5px / 16px = 0.3125rem */
    }

    nav ul li button {
        font-size: 0.875rem; /* 14px / 16px = 0.875rem */
        padding: 0.5rem 0.75rem; /* 8px/16px, 12px/16px */
    }

    main {
        padding: 1.25rem; /* 20px / 16px = 1.25rem */
    }

    h1 {
        font-size: 1.75rem; /* Adjusted from 2em to rem for consistency */
    }

    h2 {
        font-size: 1.25rem; /* Adjusted from 1.5em to rem for consistency */
    }

    p {
        font-size: 0.875rem; /* Adjusted from 0.9em to rem for consistency */
    }

    #home, #registration, #contact {
        width: 95%;
        margin: 0.9375rem auto; /* 15px / 16px = 0.9375rem */
        padding: 0.9375rem; /* 15px / 16px = 0.9375rem */
    }

    ul li {
        width: 90%;
        margin: 0.5rem auto; /* 8px / 16px = 0.5rem */
        padding: 0.5rem; /* 8px / 16px = 0.5rem */
    }

    footer {
        font-size: 0.75rem; /* 12px / 16px = 0.75rem */
        padding: 0.9375rem; /* 15px / 16px = 0.9375rem */
    }
}
