/* Reset some default styles */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333333;
}

/* Header */
header {
    background-color: #1a1a1a;
    color: #ffffff;
    text-align: center;
    padding: 1rem;
    position: relative; /* This allows absolute positioning of the button */
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    background-color: transparent;
    padding: 1rem 0;
    margin: 0;
}

nav ul li {
    margin: 0;
    padding: 0 1.5rem;
    border-right: 1px solid #fff;
    transition: border-color 0.3s;
}

nav ul li:first-child {
    border-left: none;
}

nav ul li:last-child {
    border-right: none;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    padding: 0.5rem 0;
    border-radius: 4px;
    transition: color 0.3s, background-color 0.3s;
    outline: none;
    display: block;
    font-weight: 500;
}

nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Main Content */
section {
    padding: 2rem;
    background-color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
                0 1px 2px rgba(0, 0, 0, 0.24);
    border-radius: 4px;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

section p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    text-align: center;
    padding: 1rem;
}

footer p {
    margin: 0;
    font-size: 1.1rem;
}

/* Return to Landing Page Button */
#return-to-landing-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #333333;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    outline: none;
}

#return-to-landing-btn:hover {
    background-color: #555555;
}

#return-to-landing-btn:focus {
    outline: none;
    background-color: #777777;
}

/* Floating Back to Top Button */
#back-to-top-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px; /* Increased size for better tap target */
    height: 50px;
    background-color: #333333;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 28px; /* Increased font size */
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 1000;
    text-align: center;
    line-height: 50px; /* Match the height for centering */
}

#back-to-top-btn:hover {
    background-color: #555555;
}

#back-to-top-btn:focus {
    outline: none;
    background-color: #555555;
}

#back-to-top-btn:active {
    background-color: #777777;
}

/* Skip Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #333333;
    color: #ffffff;
    padding: 10px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.skip-link:focus,
.skip-link:active {
    top: 0;
    opacity: 1;
}

nav a.focused {
    color: #ffffff;
    background-color: #333333;
}

@media (max-width: 768px) {
    /* Increase font sizes */
    body {
        font-size: 1.1rem;
    }

    header h1 {
        font-size: 2.2rem;
    }

    header p {
        font-size: 1.3rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    section h3 {
        font-size: 1.4rem;
    }

    section p,
    footer p {
        font-size: 1.2rem;
    }

    /* Adjust navigation to vertical stack */
    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        padding: 0.5rem 0;
        border: none;
        width: 100%;
        text-align: center;
    }

    /* Remove left border on the first nav item */
    nav ul li:first-child {
        border-left: none;
    }

    nav ul li + li {
        border-top: 1px solid #fff;
    }

    /* Adjust section padding */
    section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Adjust header padding */
    header {
        padding: 0.8rem;
    }

    /* Center Return to Landing Page Button */
    #return-to-landing-btn {
        position: static;
        display: block;
        margin: 0 auto 1rem;
        padding: 0.6rem 1rem;
        text-align: center;
    }

    /* Show Back to Top Button */
    #back-to-top-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    /* Further increase font sizes */
    body {
        font-size: 1.2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1.4rem;
    }

    section h2 {
        font-size: 1.6rem;
    }

    section h3 {
        font-size: 1.3rem;
    }

    section p,
    footer p {
        font-size: 1.3rem;
    }

    /* Adjust navigation to vertical stack */
    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        padding: 0.4rem 0;
        border: none;
        width: 100%;
        text-align: center;
    }

    /* Remove left border on the first nav item */
    nav ul li:first-child {
        border-left: none;
    }

    nav ul li + li {
        border-top: 1px solid #fff;
    }

    /* Adjust section padding */
    section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Center Return to Landing Page Button */
    #return-to-landing-btn {
        margin-bottom: 1.5rem;
        padding: 0.7rem 1.2rem;
        font-size: 1rem;
    }
}
