.page-container {
    display: flex;
    /* Let content define height; no fixed 100vh so the natural scrollbar is on the far right */
    flex-direction: row; 
    width: 100%;
    /* no overflow: hidden; so that the browser handles scrolling at the far right */
}

/* NAV STYLES */
.nav-whole {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    width: 23%; 
    max-width: 350px; 
    box-sizing: border-box;
}

.nav-container {
    background-color: rgba(255, 255, 255, 0.7 );
    border-radius: 15px;
    padding-bottom: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.5 );
    color: #000;
    justify-items: center;
    position: relative;
}

.nav-head {
    text-align: center;
    padding-top: 20px;
    margin-bottom: 20px;
}

.nav-head h1 {
    margin: 0;
    font-size: 2em;
    font-weight: bold;
}

.nav-section {
    padding-top: 20px;
    transition: background-color 0.3s;
    border-top: 2px solid #000;
    width: 100%;
    justify-items: center;
}

.nav-section:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-title {
    padding-left: 15px;
    padding-right: 15px;
    font-size: 1.5em;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

.nav-cont {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 10px;
    font-size: 1em; 
    justify-content: center;
}

.button {
    padding-top: 10px;
    padding-bottom: 10px;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0);
    border-top: 2px solid #000;
    width: 100%;
    color: #000;
    cursor: pointer;
    display: flex;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none !important;
}

.button:hover {
    background-color: #000;
    color: #FFF;
}

/* MAIN CONTENT */
main {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    flex: 1 1 auto; /* takes remaining space */
    /* no overflow-y: auto; the entire page scrolls naturally */
    position: relative;
    transition: transform 0.5s ease; /* for slide-in on small screens */
}

.main-container {
    background-color: rgba(255, 255, 255, 0.7 );
    border-radius: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.5 );
    color: #000;
    opacity: 0; 
    transform: translateX(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.main-header {
    text-align: center;
    padding-top: 20px;
    padding-left: 20px;
    padding-bottom: 20px;
    font-size: 1.5em;
    font-weight: bold;
    border-bottom: 2px solid #000;
}

.main-body {
    padding: 20px;
}

.main-button {
    padding: 7px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0);
    border: 2px solid #000;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none !important; 
    color: #000; 
}

.main-button:hover {
    background-color: #000;
    color: #FFF;
}

p {
    display: flex;
    align-items: center; 
    margin-bottom: 0px;
    margin-top: 10px;
    gap: 10px; 
}

/* The toggle-main-button on small screens */
.toggle-main-container {
    text-align: center;
    padding: 20px;
    display: none; /* hidden by default, shown on small screens */
}

.toggle-main-button {
    background: none;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 10px;
    font-size: 2em;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
}

.toggle-main-button:hover {
    background-color: #000;
    color: #FFF;
}

.toggle-main-text {
    font-size: 0.8em;
    margin-top: 5px;
} 

main.showing .main-container {
} 

.page-container.show-main main .main-container {
    opacity: 1;
    transform: translateX(0);
}
.page-container.show-main main .main-container:nth-child(1) {
    transition-delay: 0.1s;
}
.page-container.show-main main .main-container:nth-child(2) {
    transition-delay: 0.2s;
}
.page-container.show-main main .main-container:nth-child(3) {
    transition-delay: 0.3s;
}
.page-container.show-main main .main-container:nth-child(4) {
    transition-delay: 0.4s;
} 
.page-container.show-main main .main-container:nth-child(5) {
    transition-delay: 0.5s; 
} 
.page-container.show-main main .main-container:nth-child(6) {
    transition-delay: 0.6s;
}
.page-container.show-main main .main-container:nth-child(7) {
    transition-delay: 0.7s;
}
.page-container.show-main main .main-container:nth-child(8) {
    transition-delay: 0.8s;
}
.page-container.show-main main .main-container:nth-child(9) {
    transition-delay: 0.9s;
} 
.page-container.show-main main .main-container:nth-child(10) {
    transition-delay: 1.0s; 
} 

/* Responsive adjustments for small screens */
@media (max-width: 550px) {
    .page-container {
        flex-direction: column;  
        padding: 0px 30px; 
    }
    main {
        /* Hide main off-screen initially */
        transform: translateX(100%);
        width: 100%;
    }
    .toggle-main-container {
        display: block;
    }
    .nav-whole {
        width: 100%;
        max-width: 100%;
    }

    /* When .page-container has class 'show-main', show main with animation */
    .page-container.show-main main {
        transform: translateX(0%);
    }
}


@media (max-width: 700px) and (min-width: 550px) { 
    .nav-whole {
        width: 50%; 
    } 
} 

@media (max-width: 800px) and (min-width: 700px) { 
    .nav-whole {
        width: 40%; 
    } 
} 


@media (max-width: 1100px) and (min-width: 800px) { 
    .nav-whole {
        width: 30%; 
    } 
}
